IlcConfDb Class Reference

#include <IlcConfDb.hh>

Collaboration diagram for IlcConfDb:

Collaboration graph
[legend]
List of all members.

Public Member Functions

AsicConfiguration & getAsicConfiguration (ui32 runId)

Static Public Member Functions

static IlcConfDbgetInstance ()

Private Member Functions

 IlcConfDb ()
 ~IlcConfDb ()
void init ()

Private Attributes

bool initialised

Static Private Attributes

static IlcConfDbhandle = NULL

Detailed Description

Definition at line 49 of file IlcConfDb.hh.


Constructor & Destructor Documentation

IlcConfDb::IlcConfDb (  )  [private]

Definition at line 31 of file IlcConfDb.cpp.

Referenced by getInstance().

00031                     :initialised(false)
00032 {
00033   handle = this;
00034   this->init(); 
00035 }

IlcConfDb::~IlcConfDb (  )  [private]

Definition at line 38 of file IlcConfDb.cpp.

00039 {
00040   DBInit::terminate();
00041 }


Member Function Documentation

AsicConfiguration & IlcConfDb::getAsicConfiguration ( ui32  runId  ) 

Definition at line 54 of file IlcConfDb.cpp.

Referenced by MicrorocSCReader::parseSCFromDb().

00055 {
00056   Setup * setup = Setup::getSetupFromRun(runId);
00057 /*
00058   vector<string> vec = setup->getSetupNames();
00059   for (vector<string>::const_iterator it =  vec.begin(); it != vec.end() ; it++)
00060   {
00061     cout << "DEBUG SETUP [" << *it << "]" << endl;
00062   }
00063 */
00064   State* state = NULL;
00065   if ( setup != NULL ) 
00066   {
00067     vector<State*> states =  setup->getStates();
00068     for ( vector<State*>::const_iterator it = states.begin(); it != states.end(); it++)
00069     {
00070       state = *it;
00071       if ( state != NULL ) {
00072         cout << " INFO: Database get  state[" << state->getName() << "]" << endl;  
00073       }
00074     }
00075     return  *(state->getAsicConfiguration()) ;
00076   }
00077 
00078   throw MicroException("No setup for this run id" );
00079 }

IlcConfDb * IlcConfDb::getInstance (  )  [static]

Definition at line 22 of file IlcConfDb.cpp.

Referenced by MicrorocXDaqReader::getNextEvent().

00023 {
00024   if ( handle == NULL )
00025   {
00026     handle = new IlcConfDb();
00027   }
00028   return handle;
00029 }

void IlcConfDb::init (  )  [private]

Definition at line 44 of file IlcConfDb.cpp.

Referenced by IlcConfDb().

00045 {
00046     if ( ! initialised )
00047     {
00048       DBInit::init();
00049       initialised = true;
00050     }
00051 }


Member Data Documentation

bool IlcConfDb::initialised [private]

Definition at line 59 of file IlcConfDb.hh.

Referenced by init().

IlcConfDb * IlcConfDb::handle = NULL [static, private]

Definition at line 61 of file IlcConfDb.hh.

Referenced by getInstance(), and IlcConfDb().


The documentation for this class was generated from the following files:
Generated on Mon Jan 7 13:18:37 2013 for MicromegasFramework by  doxygen 1.4.7