fdhwlib  2.0.25

#include <tscampaign.h>

Inheritance diagram for TsCampaign:
CursesRun

List of all members.

Public Member Functions

Public Attributes


Detailed Description

The class provide some functions to handle with the data coming from a "data run".

There are to file formats supported.

  • HPE Test Electronic Program Format (ASCII)
  • FD-das (DAQ) Format based on Cerns ROOT files.

Note:

  • If the DAQ format is use, it is required to have the root system initialized before!
  • Use only the function getEvent() to allow further generalisation of this function!
Todo:
Separate between input and output file to enable extraction of data without changing the format!? -> May this can be solved easier without parsing the format ???

Definition at line 112 of file tscampaign.h.


Constructor & Destructor Documentation

TsCampaign::TsCampaign ( )
virtual TsCampaign::~TsCampaign ( ) [virtual]

Member Function Documentation

void TsCampaign::closeAMFile ( )

Close the HPE event file.

If the file isn't open, there will be no action.

void TsCampaign::closeDaqFile ( )

Close the DAQ file.

void TsCampaign::closeDaqOutFile ( )

Close the DAQ Output file.

void TsCampaign::closeFile ( )

Close the opened event files.

void TsCampaign::display ( FILE *  fout,
int  iFirst = 0,
int  nEv = 0,
int  firstBin = 0,
int  nBins = 1000,
int  mode = 0 
)

Display a event list.

The first and the number of events can be specified.

Parameters:
foutOutput stream
iFirstNumber of the first event in the file to be displayed
nEvNumber of events to be diplayed
firstBinFirst time bin to be displayed
nBinsNumber of time bins to be displayed
mode0 standard tabular output, 1 CVS format
void TsCampaign::displayRunHeader ( FILE *  fout)

Display the information of the run header like start time and comments to the run!

void TsCampaign::displayVersion ( FILE *  fout)

Display the version of the DAQ classes.

void TsCampaign::dump ( FILE *  fout = stdout,
int  n = 0 
)

Display the content of the event file.

Parameters:
foutOutput stream
nnumber of events to show
int TsCampaign::getChannelsToRead ( )

Get the number of channels to read ???

virtual TsEvent* TsCampaign::getEvent ( ) [virtual]

Return the pointer to the actual event.

Reimplemented in CursesRun.

int TsCampaign::getEventNumber ( )

Return the number of the actual event.

int TsCampaign::getMirrorNumber ( )
int TsCampaign::getNumEvents ( )

Return the number of events in the actually opened file.

bool TsCampaign::isFileOpen ( )

Returns true if a file is opened for reading.

bool TsCampaign::isHwFormat ( )

Return Hardware format.

bool TsCampaign::isMirrorPresent ( int  nr)
int TsCampaign::loadAMEvent ( char *  fname = 0)

Get an event from the HPE event file.

If a file name is specified, automatically the previos file will be closed, the new one opened and the header information read from the new file.

Returns:
0 successfull, 1 error opening file, 2 no file open - specify a file name, 3 can not file a event in that file - file empty or wrong format ?
int TsCampaign::loadDaqEvent ( char *  fname = 0,
int  nr = -1 
)

Load a event from the DAQ file.

int TsCampaign::loadEvent ( char *  file = 0,
int  nr = -1 
)

Load the next event in the open file stream.

int TsCampaign::loadEvent ( Subrack s,
int  page 
)

Initialization of the electronic access.

int TsCampaign::loadHwEvent ( Subrack s,
int  page 
)

Load an event from the electronic.

int TsCampaign::loadPixelData ( )

Load the ADC data from the flt's.

This operation can be quite time consuming and is separated from loadHwEvent() for this reason.

int TsCampaign::openAMFile ( const char *  fname,
const char *  mode = 0 
)

Open an HPE Event file.

Parameters:
fnameCharacter string with the file name
modeMode passed to fopen. (e.g. "r", "w")
Returns:
0 successfull, 1 error opening file,
int TsCampaign::openDaqFile ( const char *  fname,
const char *  mode = 0 
)

Opens a file with the DAQ format.

Parameters:
fnameName of the file
modedefines the access mode. If ommited the file will be read only. All ROOT modes are allowed ( e.g. "recreate")
Returns:
0 successful opened, 1 error creating TMirrorEvent instance
int TsCampaign::openDaqOutFile ( char *  fname)

Open a DAQ file for writing.

This file is only intended to extract events from another DAQ file. There is no TMirrorEvent structure allocated with this file. To write AM Events use the standard DAQ file

int TsCampaign::openFile ( const char *  file,
const char *  mode = 0 
)

Open a event file.

Parameters:
fileName of the event file to be opened
mode"w" writing
int TsCampaign::openFile ( Subrack s)

Give a direct handle to the hardware to this class.

int TsCampaign::openHwConnection ( const char *  file)

Initialize the connection to the electronic.

void TsCampaign::readAMHeader ( )

Read the header information.

In the actual version of the format this are the number of events, the maximal number of pixel and the version of the HPE event format.

void TsCampaign::readDaqHeader ( )

Load the Header of the DAQ file format.

void TsCampaign::readHeader ( )

Read header information.

void TsCampaign::readHwHeader ( )

Load the header information for the electronic readout.

int TsCampaign::saveAMEvent ( )

Save a single event in HPE's Electronic Test Programm Format.

void TsCampaign::saveAMHeader ( )

Save the Event File Header Information.

int TsCampaign::saveDaqEvent ( )

Save the current event in DAQ format.

The file has to be opened before.

int TsCampaign::saveDaqEventToOutFile ( )

Save the current event in DAQ format.

Both DAQ file have to be opened before.

int TsCampaign::saveDaqFile ( char *  fname)

Save the events of the measurement campaign in DAQ format.

void TsCampaign::saveDaqHeader ( )

Save the DAQ header information.

void TsCampaign::saveEvent ( )
void TsCampaign::saveHeader ( )

Write the header infomation to the file.

void TsCampaign::setChannelsToRead ( int  nr)
void TsCampaign::setEyeNumber ( int  nr)

The HPE format does not suport this figure.

To include it in the DAQ data file use this function to set it to a fixed value

Parameters:
nr1..4
void TsCampaign::setMirrorNumber ( int  nr)

The HPE format does not suport this figure.

To include it in the DAQ data file use this function to set it to a fixed value

Parameters:
nr1..12 for eye 1 (center)
nr1..6 for eye 2..4 (satellite)
void TsCampaign::setNextPageDelay ( int  delay)

The HPE format does not suport this figure.

To include it in the DAQ data file use this function to set it to a fixed value

Parameters:
delay0..1000 [100ns]
void TsCampaign::setNumEvents ( int  nr)

Member Data Documentation

Definition at line 411 of file tscampaign.h.

Pointer to the comment string.

Definition at line 421 of file tscampaign.h.

TMirrorEvent* TsCampaign::daqEv

Definition at line 386 of file tscampaign.h.

TEyeEvent* TsCampaign::daqEv

Definition at line 391 of file tscampaign.h.

TMirrorEventFile* TsCampaign::daqFile

Definition at line 384 of file tscampaign.h.

TEyeEventFile* TsCampaign::daqFile

Definition at line 389 of file tscampaign.h.

Definition at line 393 of file tscampaign.h.

TMirrorEventFile* TsCampaign::daqOutFile

Definition at line 385 of file tscampaign.h.

TEyeEventFile* TsCampaign::daqOutFile

Definition at line 390 of file tscampaign.h.

Definition at line 394 of file tscampaign.h.

Data structure to hold one event of this measurement campaign.

Reimplemented in CursesRun.

Definition at line 441 of file tscampaign.h.

Copy of the filename.

Definition at line 373 of file tscampaign.h.

Definition at line 378 of file tscampaign.h.

Definition at line 376 of file tscampaign.h.

Maximal channel number ???

Definition at line 430 of file tscampaign.h.

Number of the actual event in the campaign.

Definition at line 435 of file tscampaign.h.

Defines the input file format.

Reading the valid header information of a format will the this flag.

  • 0 no format
  • 1 HPE Electronic Test Programm format
  • 2 DAQ Format
  • 3 Direct Electronic access ???

Definition at line 360 of file tscampaign.h.

Number of events in this campaign.

Definition at line 425 of file tscampaign.h.

Defines the output file format.

Writing the valid header information of a format will the this flag.

  • 0 no format
  • 1 HPE Electronic Test Programm format
  • 2 DAQ Format

Definition at line 369 of file tscampaign.h.

Version of the event format Sascha knows at least two different formats.

  • 0 no version information present
  • 1 Saschas old version
  • 2 Saschas new version

Definition at line 406 of file tscampaign.h.

unsigned long TsCampaign::runNo

Number of the run.

The run number is an individual number for every telescope.

Definition at line 415 of file tscampaign.h.

Reference to the electronic.

Definition at line 398 of file tscampaign.h.

Number of the station ?

Definition at line 409 of file tscampaign.h.

Time stamp when the run was started (UTC time count)

Definition at line 418 of file tscampaign.h.


The documentation for this class was generated from the following file: