#include <RawBlockRegistry.h>
Public Types | |
| typedef RawDataBlock( | RawDataBlockCreator_t )(const char *name) |
Public Member Functions | |
| ~RawBlockRegistry () | |
| void | Register (RawBlockProxy *rawBlockProxy) |
| RawBlockProxy * | LookUp (const char *name) |
| RawBlockProxy * | LookUp (bool isDCS, int majorId) |
| const std::list< RawBlockProxy * > & | GetProxyList () const |
| void | Print (Option_t *="") const |
Static Public Member Functions | |
| RawBlockRegistry & | Instance () |
Private Member Functions | |
| RawBlockRegistry () | |
| RawBlockRegistry (RawBlockRegistry &) | |
| RawBlockRegistry & | operator= (const RawBlockRegistry &rbr) |
Private Attributes | |
| std::list< RawBlockProxy * > | fRawBlockProxyTable |
Static Private Attributes | |
| RawBlockRegistry * | fInstance = 0 |
Friends | |
| struct | Cleaner |
| std::ostream & | operator<< (std::ostream &os, const RawBlockRegistry &rbr) |
|
|
Definition at line 40 of file RawBlockRegistry.h. |
|
|
Definition at line 34 of file RawBlockRegistry.cxx. 00035 {
00036 // dtor is NOT responsible for destroying elements of the list;
00037 // they are created statically and are thus automagically
00038 // destroyed when the process ends
00039 }
|
|
|
Definition at line 111 of file RawBlockRegistry.cxx. References MsgService::GetStream(), MsgService::Instance(), and MsgStream::SetLogLevel(). 00112 {
00113 //#define DEBUG_RAWDATA
00114 #ifdef DEBUG_RAWDATA
00115 #include <MessageService/MsgStream.h>
00116 // Setting this debug level at run time is too late in this case...
00117 MsgService::Instance()->GetStream("RawData")->SetLogLevel(Msg::kVerbose);
00118 #endif
00119 }
|
|
|
Definition at line 57 of file RawBlockRegistry.h. 00057 { abort(); }
|
|
|
Definition at line 49 of file RawBlockRegistry.h. Referenced by RotoObjectifier::SysLogRawBlockRegistry(). 00049 { return fRawBlockProxyTable; }
|
|
|
||||||||||||
|
Definition at line 94 of file RawBlockRegistry.cxx. References fRawBlockProxyTable. 00095 {
00096 // Check if its in table
00097 std::list<RawBlockProxy*>::iterator itrRawBlockProxyTable;
00098 for (itrRawBlockProxyTable = fRawBlockProxyTable.begin();
00099 itrRawBlockProxyTable != fRawBlockProxyTable.end();
00100 ++itrRawBlockProxyTable) {
00101 if ((*itrRawBlockProxyTable)->IsDCS() == isDCS &&
00102 (*itrRawBlockProxyTable)->GetMajorId() == majorId ) {
00103 return (*itrRawBlockProxyTable);
00104 }
00105 }
00106 return 0;
00107 }
|
|
|
|
Definition at line 58 of file RawBlockRegistry.h. 00059 { abort(); return const_cast<RawBlockRegistry&>(rbr); }
|
|
|
Definition at line 51 of file RawBlockRegistry.h. 00051 { std::cout << Instance(); }
|
|
|
Definition at line 43 of file RawBlockRegistry.cxx. References fRawBlockProxyTable, RawBlockProxy::GetMajorId(), RawBlockProxy::GetName(), RawBlockProxy::IsDCS(), LookUp(), and MSG. 00044 {
00045 const char* blockName = proxy->GetName();
00046 bool isDCS = proxy->IsDCS();
00047 int blockMajorId = proxy->GetMajorId();
00048 // Add the raw block to the table
00049 if (this->LookUp(blockName)) {
00050 MSG("RawData", Msg::kWarning)
00051 << "A raw block named " << blockName << " is already registered!\n"
00052 << "Duplicate block names are not allowed!\n";
00053 return;
00054 }
00055 else {
00056 // Do insertions in alphabetical order
00057 std::list<RawBlockProxy*>::iterator itrRawBlockProxyTable;
00058 for (itrRawBlockProxyTable = fRawBlockProxyTable.begin();
00059 itrRawBlockProxyTable != fRawBlockProxyTable.end();
00060 ++itrRawBlockProxyTable) {
00061 if (strcmp(blockName,(*itrRawBlockProxyTable)->GetName())<0) {
00062 break;
00063 }
00064 }
00065 fRawBlockProxyTable.insert(itrRawBlockProxyTable,proxy);
00066
00067 const char* isDCSstring = (isDCS) ? "DCS" : "DAQ";
00068 MSG("RawData", Msg::kDebug)
00069 << "Registered block " << blockName << " "
00070 << isDCSstring << " "
00071 << blockMajorId << " proxy @ "
00072 << proxy << "." << endl;
00073 }
00074 }
|
|
|
Definition at line 70 of file RawBlockRegistry.h. |
|
||||||||||||
|
Definition at line 20 of file RawBlockRegistry.cxx. 00021 {
00022 std::list<RawBlockProxy*>::const_iterator itrRawBlockProxyTable;
00023 os << "Registered Raw Blocks:\n";
00024 for (itrRawBlockProxyTable = rbr.fRawBlockProxyTable.begin();
00025 itrRawBlockProxyTable != rbr.fRawBlockProxyTable.end();
00026 ++itrRawBlockProxyTable) {
00027 os << " " << (*(*itrRawBlockProxyTable)) << endl;
00028 }
00029 return os;
00030 }
|
|
|
Definition at line 16 of file RawBlockRegistry.cxx. Referenced by Instance(), and RawBlockRegistry::Cleaner::~Cleaner(). |
|
|
Definition at line 75 of file RawBlockRegistry.h. Referenced by LookUp(), operator<<(), and Register(). |
1.3.9.1