AnalysisTestFramework< T > Class Template Reference

Inheritance diagram for AnalysisTestFramework< T >:

Inheritance graph
[legend]
Collaboration diagram for AnalysisTestFramework< T >:

Collaboration graph
[legend]

Public Member Functions

 AnalysisTestFramework (string isFilter=".*TestResult", string isServer="TestData")
 Creates the framework.
virtual ~AnalysisTestFramework ()
void analyzeAll (int argc, char **argv)
void printHelp ()
 Call to print the help message and exit.
int getExitCode ()
 Return the exit code.

Protected Member Functions

virtual int handleArg (int argc, int i, char **argv)
 May be overriden to handle additional args Should return the last used argument index If it doesn't understand the arg, it should call printHelp().
virtual void printAdditionalArgs ()
 Override to print addition help messages.
virtual void printHelpHeader ()
 Override to change print help header.
virtual void summaryOutput ()
virtual void doModule (string serialNumber)
 The main method for doing anything.
virtual vector< boost::shared_ptr<
T > > 
readData (string serialNumber)
 Waits for and returns the data corresponding to serialNumber Reads nData objects.
virtual void publishData ()
 Should override this to publish the data.
virtual void downloadData (string serialNumber)
 Should override this to download data from the database.
virtual void compare (const T &t)
virtual void setup ()
virtual void tearDown ()
 Close the TFile.

Protected Attributes

int exitCode
bool readOnly
bool debug
SctTestApi::HighLevelApi_var highLevelApi
unsigned int nModules
unsigned int nSkip
list< string > modules
TFile * file
TTree * tree
SctTest::ModuleData moduleData
unsigned int maxModules
unsigned int nData
string isFilter
string isServer
list< string > ignoreModules
string ignoreFile

Private Member Functions

void loadIgnoreFile ()
void handleArgs (int argc, char **argv)

Static Private Member Functions

static void getRootApp ()

Detailed Description

template<typename T>
class AnalysisTestFramework< T >

Definition at line 33 of file AnalysisTestFramework.h.


Constructor & Destructor Documentation

template<typename T>
AnalysisTestFramework< T >::AnalysisTestFramework string  isFilter = ".*TestResult",
string  isServer = "TestData"
 

Creates the framework.

The isFilter is a string which selects the object in IS. It is assumed that the serial number can be appended to it to create the correct filter. The isServer is the server to get the objects from.

Definition at line 335 of file AnalysisTestFramework.h.

References AnalysisTestFramework< T >::debug, AnalysisTestFramework< T >::exitCode, AnalysisTestFramework< T >::file, AnalysisTestFramework< T >::maxModules, AnalysisTestFramework< T >::nData, AnalysisTestFramework< T >::nModules, AnalysisTestFramework< T >::nSkip, AnalysisTestFramework< T >::readOnly, and AnalysisTestFramework< T >::tree.


Member Function Documentation

template<typename T>
void AnalysisTestFramework< T >::doModule string  serialNumber  )  [protected, virtual]
 

The main method for doing anything.

Sets the appropriate module serialNumber, then calls publishData, then calls downloadData, waits for the data to be published, and calls compare.

Reimplemented in NagRootCompare.

Definition at line 160 of file AnalysisTestFramework.h.

References AnalysisTestFramework< T >::compare(), AnalysisTestFramework< T >::downloadData(), AnalysisTestFramework< T >::highLevelApi, AnalysisTestFramework< T >::publishData(), AnalysisTestFramework< T >::readData(), and AnalysisTestFramework< T >::readOnly.

Here is the call graph for this function:

template<typename T>
virtual void AnalysisTestFramework< T >::downloadData string  serialNumber  )  [inline, protected, virtual]
 

Should override this to download data from the database.

Reimplemented in FullBypassCompare, NoiseOccupancyCompare, NPtGainCompare, PipelineCompare, StrobeDelayCompare, TimeWalkCompare, TrimRangeCompare, and FitCompare.

Definition at line 96 of file AnalysisTestFramework.h.

Referenced by AnalysisTestFramework< T >::doModule().

template<typename T>
int AnalysisTestFramework< T >::getExitCode  )  [inline]
 

Return the exit code.

Definition at line 53 of file AnalysisTestFramework.h.

template<typename T>
int AnalysisTestFramework< T >::handleArg int  argc,
int  i,
char **  argv
[protected, virtual]
 

May be overriden to handle additional args Should return the last used argument index If it doesn't understand the arg, it should call printHelp().

Reimplemented in NPtGainCompare, and FitCompare.

Definition at line 205 of file AnalysisTestFramework.h.

References AnalysisTestFramework< T >::printHelp().

Here is the call graph for this function:

template<typename T>
virtual void AnalysisTestFramework< T >::printAdditionalArgs  )  [inline, protected, virtual]
 

Override to print addition help messages.

Reimplemented in NPtGainCompare, and FitCompare.

Definition at line 66 of file AnalysisTestFramework.h.

Referenced by AnalysisTestFramework< T >::printHelp().

template<typename T>
void AnalysisTestFramework< T >::printHelp  ) 
 

Call to print the help message and exit.

Definition at line 191 of file AnalysisTestFramework.h.

References AnalysisTestFramework< T >::printAdditionalArgs(), and AnalysisTestFramework< T >::printHelpHeader().

Referenced by AnalysisTestFramework< T >::handleArg().

Here is the call graph for this function:

template<typename T>
void AnalysisTestFramework< T >::printHelpHeader  )  [protected, virtual]
 

Override to change print help header.

Definition at line 184 of file AnalysisTestFramework.h.

Referenced by AnalysisTestFramework< T >::printHelp().

template<typename T>
virtual void AnalysisTestFramework< T >::publishData  )  [inline, protected, virtual]
 

Should override this to publish the data.

Reimplemented in FullBypassCompare, NoiseOccupancyCompare, NPtGainCompare, PipelineCompare, StrobeDelayCompare, TimeWalkCompare, TrimRangeCompare, NagRootCompare, and FitCompare.

Definition at line 91 of file AnalysisTestFramework.h.

Referenced by AnalysisTestFramework< T >::doModule().

template<typename T>
vector< shared_ptr< T > > AnalysisTestFramework< T >::readData string  serialNumber  )  [protected, virtual]
 

Waits for and returns the data corresponding to serialNumber Reads nData objects.

Definition at line 128 of file AnalysisTestFramework.h.

References AnalysisTestFramework< T >::isFilter, AnalysisTestFramework< T >::isServer, and AnalysisTestFramework< T >::nData.

Referenced by AnalysisTestFramework< T >::doModule().

template<typename T>
void AnalysisTestFramework< T >::tearDown  )  [protected, virtual]
 

Close the TFile.

Definition at line 153 of file AnalysisTestFramework.h.

References AnalysisTestFramework< T >::file.


The documentation for this class was generated from the following file:
Generated on Mon Feb 6 14:01:41 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6