ReadTriggerSegments Class Reference

Access segments in trigger files. More...

#include <ReadTriggerSegments.h>

Inheritance diagram for ReadTriggerSegments:
Inheritance graph
[legend]
Collaboration diagram for ReadTriggerSegments:
Collaboration graph
[legend]

List of all members.

Public Member Functions

double * GetFileStarts (void)
 Returns the list of file time starts.
double * GetFileStops (void)
 Returns the list of file time stops.
int GetNFiles (void)
 Returns the number of input files.
int GetNTrees (void)
 Returns the number of input trees.
SegmentsGetSegments (void)
 Returns a pointer to the Segments object attached to the triggers.
double GetTimeMax (void)
 Returns the ending time.
double GetTimeMin (void)
 Returns the starting time.
double * GetTreeStarts (void)
 Returns the list of file time starts.
double * GetTreeStops (void)
 Returns the list of file time stops.
string GetTriggerFiles (const double astart, const double astop)
 Returns the list of input files which contain data between 'astart' and 'astop'.
bool SetNewPattern (const string apattern)
 Sets a new input file pattern.
void SetVerbose (const int averbose)
 Sets verbosity level.
Constructors and destructors



 ReadTriggerSegments (const string apattern, const string adirectory="", const int averbose=0)
 Constructor of the ReadTriggerSegments class.
virtual ~ReadTriggerSegments (void)
 Destructor of the ReadTriggerSegments class.

Protected Attributes

string fdir
 directory
string fpattern
 pattern of input root files
vector< string > frootfilename
 root file names (paths)
double fTimeMax
 max time
double fTimeMin
 min time
int fverbose
 verbosity level
int Ninfiles
 number of input files
int randid
 random integer id
SegmentsSeg
 segment structure
string srandid
 random string id
bool status_OK
 general status
double * Tstart
 file starts (min start)
double * Tstop
 file stops (max end)

Detailed Description

Access segments in trigger files.

This class is a sub-product of the ReadTriggers class. It should be used when you're only interested by the segment content of trigger files. Only the segment content of the files is loaded so this class is much faster than the ReadTriggers class since the triggers are never loaded. This is quite useful when hundreds of files need to be scanned only to access the timing information.

IMPORTANT: the input files in 'apattern' should be time-sorted and with NO overlap

IMPORTANT_2: the segments in the trigger files must follow the GWOLLUM convention for triggers.

Author:
Florent Robinet

Constructor & Destructor Documentation

ReadTriggerSegments::ReadTriggerSegments ( const string  apattern,
const string  adirectory = "",
const int  averbose = 0 
)

Constructor of the ReadTriggerSegments class.

The segments in files designated by the file pattern 'apattern' are loaded. The segment tree is accessed in the root directory 'adirectory'. The verbosity level, set by 'averbose', follows the GWOLLUM convention for verbosity.

IMPORTANT: the input files in 'apattern' should be time-sorted and with NO overlap

Parameters:
apattern input file pattern
adirectory trigger ROOT directory
averbose verbosity level
ReadTriggerSegments::~ReadTriggerSegments ( void   )  [virtual]

Destructor of the ReadTriggerSegments class.


Member Function Documentation

double* ReadTriggerSegments::GetFileStarts ( void   )  [inline]

Returns the list of file time starts.

DO NOT DELETE OR MODIFY

double* ReadTriggerSegments::GetFileStops ( void   )  [inline]

Returns the list of file time stops.

DO NOT DELETE OR MODIFY

int ReadTriggerSegments::GetNFiles ( void   )  [inline]

Returns the number of input files.

int ReadTriggerSegments::GetNTrees ( void   )  [inline]

Returns the number of input trees.

Segments* ReadTriggerSegments::GetSegments ( void   )  [inline]

Returns a pointer to the Segments object attached to the triggers.

DO NOT DELETE OR MODIFY this object.

double ReadTriggerSegments::GetTimeMax ( void   )  [inline]

Returns the ending time.

DO NOT DELETE OR MODIFY

Reimplemented in ReadTriggers.

double ReadTriggerSegments::GetTimeMin ( void   )  [inline]

Returns the starting time.

DO NOT DELETE OR MODIFY

Reimplemented in ReadTriggers.

double* ReadTriggerSegments::GetTreeStarts ( void   )  [inline]

Returns the list of file time starts.

DO NOT DELETE OR MODIFY

double* ReadTriggerSegments::GetTreeStops ( void   )  [inline]

Returns the list of file time stops.

DO NOT DELETE OR MODIFY

string ReadTriggerSegments::GetTriggerFiles ( const double  astart,
const double  astop 
)

Returns the list of input files which contain data between 'astart' and 'astop'.

This list is a string where file paths are separated by a white space. If no file is found, "none" is returned.

Parameters:
astart starting time
astart ending time
bool ReadTriggerSegments::SetNewPattern ( const string  apattern  ) 

Sets a new input file pattern.

This function resets the ReadTriggerSegments object to introduce a new list of files given by 'apattern'.

Parameters:
apattern new input file pattern

Reimplemented in ReadTriggerMetaData, and ReadTriggers.

void ReadTriggerSegments::SetVerbose ( const int  averbose  )  [inline]

Sets verbosity level.

Parameters:
averbose new verbosity level

Member Data Documentation

string ReadTriggerSegments::fdir [protected]

directory

string ReadTriggerSegments::fpattern [protected]

pattern of input root files

vector<string> ReadTriggerSegments::frootfilename [protected]

root file names (paths)

double ReadTriggerSegments::fTimeMax [protected]

max time

double ReadTriggerSegments::fTimeMin [protected]

min time

verbosity level

number of input files

int ReadTriggerSegments::randid [protected]

random integer id

segment structure

string ReadTriggerSegments::srandid [protected]

random string id

general status

double* ReadTriggerSegments::Tstart [protected]

file starts (min start)

double* ReadTriggerSegments::Tstop [protected]

file stops (max end)


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Friends Defines

Generated on 26 Sep 2014 by  doxygen 1.6.1