ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConf::TrigConfCoolFolderSpec Class Reference

Definition of the COOL folder structure for the trigger configuration data. More...

#include <TrigConfCoolFolderSpec.h>

Collaboration diagram for TrigConf::TrigConfCoolFolderSpec:

Static Public Member Functions

static int readSchemaVersion (cool::IDatabasePtr db)
 get the version of the COOL database
static int getDefaultSchemaVersion ()
 access to the version
static cool::IFolderSetPtr createFolderStructure (cool::IDatabasePtr db, int schemaVersion=0)
 creates the folder structure in the COOL database
static cool::IFolderSetPtr createMonFolderStructure (cool::IDatabasePtr db, int schemaVersion=0)
 creates the folder structure in the monitoring COOL database
static void printFolderStructure (cool::IDatabasePtr db, std::ostream &o)
 prints the folder structure that is in the COOL database
static cool::IFolderPtr getLvl1MenuFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getLvl1ItemDefFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getLvl1ThresholdFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getLvl1ConfKeyFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getLvl1PrescalesFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getLvl1BGKeyFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getLvl1BGContentFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getLvl1BGDescFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getLvl1InputMapFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getLvl1MonMapFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getHltMenuFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getHltChainGroupFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getHltConfKeyFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getMonConfKeyFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getHltPrescalesFolder (cool::IDatabasePtr db)
static cool::IFolderPtr getHltPrescaleKeyFolder (cool::IDatabasePtr db)
static int determineSchemaVersion (const std::vector< cool::IFolderPtr > &folders)
static bool CreateFolderIfNotExist (cool::IDatabasePtr db, const std::string &folder, const cool::IRecordSpecification &spec, cool::FolderVersioning::Mode mode, bool isMultiChannel)
static bool CreateFolderIfNotExist (cool::IDatabasePtr db, FolderDefinition fd, bool isMultiChannel)
static FolderDefinition Lvl1MenuFolderDefinition ()
static FolderDefinition Lvl1ItemDefFolderDefinition ()
static FolderDefinition Lvl1ThresholdFolderDefinition ()
static FolderDefinition Lvl1ConfigKeysFolderDefinition ()
static FolderDefinition Lvl1PrescalesFolderDefinition (int schemaVersion)
static FolderDefinition Lvl1InputMapFolderDefinition ()
static FolderDefinition Lvl1BGKeyFolderDefinition ()
static FolderDefinition Lvl1BGContentFolderDefinition ()
static FolderDefinition Lvl1BGDescFolderDefinition ()
static FolderDefinition HltMenuFolderDefinition ()
static FolderDefinition HltChainGroupFolderDefinition ()
static FolderDefinition HltConfigKeysFolderDefinition ()
static FolderDefinition HltPrescalesFolderDefinition ()
static FolderDefinition HltPrescaleKeyFolderDefinition ()
static FolderDefinition Lvl1MonMapFolderSpecification ()
static cool::RecordSpecification createLvl1MenuFolderSpecification ()
 defines the folder structure for the LVL1 menu
static cool::RecordSpecification createLvl1ItemDefFolderSpecification ()
 defines the folder structure for the LVL1 item def
static cool::RecordSpecification createLvl1ThresholdFolderSpecification ()
 defines the folder structure for the LVL1 thresholds
static cool::RecordSpecification createLvl1ConfigKeysFolderSpecification ()
 defines the folder structure for the LVL1 config key
static cool::RecordSpecification createLvl1PrescalesFolderSpecification (int schemaVersion)
 defines the folder structure for the LVL1 prescales
static cool::RecordSpecification createLvl1InputMapFolderSpecification ()
 defines the folder structure for the LVL1 CTP input map
static cool::RecordSpecification createLvl1MonMapFolderSpecification ()
 defines the folder structure for the LVL1 monitoring counter map
static cool::RecordSpecification createLvl1BGKeyFolderSpecification ()
 defines the folder structure for the LVL1 bunch group key
static cool::RecordSpecification createLvl1BGContentFolderSpecification ()
 defines the folder structure for the LVL1 bunch groups
static cool::RecordSpecification createLvl1BGDescFolderSpecification ()
 defines the folder structure for the LVL1 bunch group descriptions
static cool::RecordSpecification createHltMenuFolderSpecification ()
 defines the folder structure for the HLT menu
static cool::RecordSpecification createHltChainGroupFolderSpecification ()
 defines the folder structure for the HLT chain groups
static cool::RecordSpecification createHltConfigKeysFolderSpecification ()
 defines the folder structure for the HLT config key
static cool::RecordSpecification createHltPrescalesFolderSpecification ()
 defines the folder structure for the HLT prescales
static cool::RecordSpecification createHltPrescaleKeyFolderSpecification ()
 defines the folder structure for the HLT prescales

Static Public Attributes

static const int mDefaultSchemaVersion = 3
static const long mBGDescBlobSize = 512
static const long mBGContentBlobSize = 3564

Private Member Functions

 TrigConfCoolFolderSpec ()
 default constructor
 TrigConfCoolFolderSpec (const TrigConfCoolFolderSpec &)
 copy constructor

Detailed Description

Definition of the COOL folder structure for the trigger configuration data.

Definition at line 53 of file TrigConfCoolFolderSpec.h.

Constructor & Destructor Documentation

◆ TrigConfCoolFolderSpec() [1/2]

TrigConf::TrigConfCoolFolderSpec::TrigConfCoolFolderSpec ( )
inlineprivate

default constructor

Definition at line 199 of file TrigConfCoolFolderSpec.h.

199{};

◆ TrigConfCoolFolderSpec() [2/2]

TrigConf::TrigConfCoolFolderSpec::TrigConfCoolFolderSpec ( const TrigConfCoolFolderSpec & )
inlineprivate

copy constructor

Definition at line 202 of file TrigConfCoolFolderSpec.h.

202{};

Member Function Documentation

◆ CreateFolderIfNotExist() [1/2]

bool TrigConf::TrigConfCoolFolderSpec::CreateFolderIfNotExist ( cool::IDatabasePtr db,
const std::string & folder,
const cool::IRecordSpecification & spec,
cool::FolderVersioning::Mode mode,
bool isMultiChannel )
static

◆ CreateFolderIfNotExist() [2/2]

bool TrigConf::TrigConfCoolFolderSpec::CreateFolderIfNotExist ( cool::IDatabasePtr db,
FolderDefinition fd,
bool isMultiChannel )
static

◆ createFolderStructure()

IFolderSetPtr TrigConfCoolFolderSpec::createFolderStructure ( cool::IDatabasePtr db,
int schemaVersion = 0 )
static

creates the folder structure in the COOL database

Parameters
dbCOOL database
Returns
pointer to the folder structure

Definition at line 415 of file TrigConfCoolFolderSpec.cxx.

415 {
416
417 if(schemaVersion==0) schemaVersion = getDefaultSchemaVersion();
418
419 std::string singleChannelDesc = "<timeStamp>run-lumi</timeStamp><addrHeader><address_header service_type=\"71\" clid=\"40774348\" /></addrHeader><typeName>AthenaAttributeList</typeName>";
420 std::string multiChannelDesc = "<timeStamp>run-lumi</timeStamp><addrHeader><address_header service_type=\"71\" clid=\"1238547719\" /></addrHeader><typeName>CondAttrListCollection</typeName>";
421 //std::string timeDesc = "<timeStamp>time</timeStamp><addrHeader><address_header service_type=\"71\" clid=\"40774348\" /></addrHeader><typeName>AthenaAttributeList</typeName>";
422
423 bool newFolder = false;
424
425 static const bool singleChannel(false);
426 static const bool multiChannel(true);
427
428 IFolderSetPtr topFolder;
429 if( !db->existsFolderSet( "/TRIGGER" ) ) {
430 newFolder = true;
431 topFolder = db->createFolderSet( "/TRIGGER" );
432 }
433 if( !db->existsFolderSet( "/TRIGGER/LVL1" ) ) {
434 newFolder = true;
435 db->createFolderSet( "/TRIGGER/LVL1" );
436 }
437 if( !db->existsFolderSet( "/TRIGGER/HLT" ) ) {
438 newFolder = true;
439 db->createFolderSet( "/TRIGGER/HLT" );
440 }
441
442 newFolder |= CreateFolderIfNotExist(db, Lvl1MenuFolderDefinition(), multiChannel);
443
444 newFolder |= CreateFolderIfNotExist(db, Lvl1ItemDefFolderDefinition(), multiChannel);
445
446 newFolder |= CreateFolderIfNotExist(db, Lvl1ThresholdFolderDefinition(), multiChannel);
447
448 newFolder |= CreateFolderIfNotExist(db, Lvl1ConfigKeysFolderDefinition(), singleChannel);
449
450 newFolder |= CreateFolderIfNotExist(db, Lvl1PrescalesFolderDefinition(schemaVersion), multiChannel);
451
452 newFolder |= CreateFolderIfNotExist(db, Lvl1BGKeyFolderDefinition(), singleChannel);
453
454 newFolder |= CreateFolderIfNotExist(db, Lvl1BGContentFolderDefinition(), singleChannel);
455
456 newFolder |= CreateFolderIfNotExist(db, Lvl1BGDescFolderDefinition(), singleChannel);
457
458 newFolder |= CreateFolderIfNotExist(db, Lvl1InputMapFolderDefinition(), multiChannel);
459
460 newFolder |= CreateFolderIfNotExist(db, HltConfigKeysFolderDefinition(), singleChannel);
461
462 newFolder |= CreateFolderIfNotExist(db, HltMenuFolderDefinition(), multiChannel);
463
464 newFolder |= CreateFolderIfNotExist(db, HltChainGroupFolderDefinition(), multiChannel);
465
466 newFolder |= CreateFolderIfNotExist(db, HltPrescalesFolderDefinition(), multiChannel);
467
468 newFolder |= CreateFolderIfNotExist(db, HltPrescaleKeyFolderDefinition(), singleChannel);
469
470 if(newFolder) printFolderStructure(std::move(db), cout);
471
472 return topFolder;
473}
static FolderDefinition HltPrescalesFolderDefinition()
static void printFolderStructure(cool::IDatabasePtr db, std::ostream &o)
prints the folder structure that is in the COOL database
static FolderDefinition Lvl1ItemDefFolderDefinition()
static FolderDefinition Lvl1BGDescFolderDefinition()
static FolderDefinition Lvl1BGKeyFolderDefinition()
static FolderDefinition HltPrescaleKeyFolderDefinition()
static FolderDefinition Lvl1ConfigKeysFolderDefinition()
static FolderDefinition Lvl1BGContentFolderDefinition()
static FolderDefinition HltMenuFolderDefinition()
static int getDefaultSchemaVersion()
access to the version
static FolderDefinition Lvl1ThresholdFolderDefinition()
static FolderDefinition Lvl1PrescalesFolderDefinition(int schemaVersion)
static FolderDefinition HltChainGroupFolderDefinition()
static FolderDefinition Lvl1InputMapFolderDefinition()
static FolderDefinition Lvl1MenuFolderDefinition()
static bool CreateFolderIfNotExist(cool::IDatabasePtr db, const std::string &folder, const cool::IRecordSpecification &spec, cool::FolderVersioning::Mode mode, bool isMultiChannel)
static FolderDefinition HltConfigKeysFolderDefinition()

◆ createHltChainGroupFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createHltChainGroupFolderSpecification ( )
static

defines the folder structure for the HLT chain groups

Definition at line 280 of file TrigConfCoolFolderSpec.cxx.

280 {
282}
cool::RecordSpecification & rspec()

◆ createHltConfigKeysFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createHltConfigKeysFolderSpecification ( )
static

defines the folder structure for the HLT config key

Definition at line 297 of file TrigConfCoolFolderSpec.cxx.

297 {
299}

◆ createHltMenuFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createHltMenuFolderSpecification ( )
static

defines the folder structure for the HLT menu

Definition at line 256 of file TrigConfCoolFolderSpec.cxx.

256 {
258}

◆ createHltPrescaleKeyFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createHltPrescaleKeyFolderSpecification ( )
static

defines the folder structure for the HLT prescales

Definition at line 333 of file TrigConfCoolFolderSpec.cxx.

333 {
335}

◆ createHltPrescalesFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createHltPrescalesFolderSpecification ( )
static

defines the folder structure for the HLT prescales

Definition at line 315 of file TrigConfCoolFolderSpec.cxx.

315 {
317}

◆ createLvl1BGContentFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createLvl1BGContentFolderSpecification ( )
static

defines the folder structure for the LVL1 bunch groups

Definition at line 208 of file TrigConfCoolFolderSpec.cxx.

208 {
210}

◆ createLvl1BGDescFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createLvl1BGDescFolderSpecification ( )
static

defines the folder structure for the LVL1 bunch group descriptions

Definition at line 224 of file TrigConfCoolFolderSpec.cxx.

224 {
226}

◆ createLvl1BGKeyFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createLvl1BGKeyFolderSpecification ( )
static

defines the folder structure for the LVL1 bunch group key

Definition at line 192 of file TrigConfCoolFolderSpec.cxx.

192 {
194}

◆ createLvl1ConfigKeysFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createLvl1ConfigKeysFolderSpecification ( )
static

defines the folder structure for the LVL1 config key

Definition at line 134 of file TrigConfCoolFolderSpec.cxx.

134 {
136}

◆ createLvl1InputMapFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createLvl1InputMapFolderSpecification ( )
static

defines the folder structure for the LVL1 CTP input map

Definition at line 170 of file TrigConfCoolFolderSpec.cxx.

170 {
172}

◆ createLvl1ItemDefFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createLvl1ItemDefFolderSpecification ( )
static

defines the folder structure for the LVL1 item def

Definition at line 98 of file TrigConfCoolFolderSpec.cxx.

98 {
100}

◆ createLvl1MenuFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createLvl1MenuFolderSpecification ( )
static

defines the folder structure for the LVL1 menu

Definition at line 81 of file TrigConfCoolFolderSpec.cxx.

81 {
83}

◆ createLvl1MonMapFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createLvl1MonMapFolderSpecification ( )
static

defines the folder structure for the LVL1 monitoring counter map

Definition at line 353 of file TrigConfCoolFolderSpec.cxx.

353 {
355}
static FolderDefinition Lvl1MonMapFolderSpecification()

◆ createLvl1PrescalesFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createLvl1PrescalesFolderSpecification ( int schemaVersion)
static

defines the folder structure for the LVL1 prescales

Definition at line 150 of file TrigConfCoolFolderSpec.cxx.

150 {
151 return Lvl1PrescalesFolderDefinition(schemaVersion).rspec();
152}

◆ createLvl1ThresholdFolderSpecification()

RecordSpecification TrigConfCoolFolderSpec::createLvl1ThresholdFolderSpecification ( )
static

defines the folder structure for the LVL1 thresholds

Definition at line 116 of file TrigConfCoolFolderSpec.cxx.

116 {
118}

◆ createMonFolderStructure()

IFolderSetPtr TrigConfCoolFolderSpec::createMonFolderStructure ( cool::IDatabasePtr db,
int schemaVersion = 0 )
static

creates the folder structure in the monitoring COOL database

Parameters
dbCOOL database
Returns
pointer to the folder structure

Definition at line 476 of file TrigConfCoolFolderSpec.cxx.

476 {
477
478 bool multiChannel(true);
479
480
481 bool newFolder = CreateFolderIfNotExist(db, Lvl1MonMapFolderSpecification(), multiChannel);
482 if(newFolder)
483 printFolderStructure(db, cout);
484
485 return db->getFolderSet( "/TRIGGER" );
486}

◆ determineSchemaVersion()

int TrigConf::TrigConfCoolFolderSpec::determineSchemaVersion ( const std::vector< cool::IFolderPtr > & folders)
static

◆ getDefaultSchemaVersion()

int TrigConf::TrigConfCoolFolderSpec::getDefaultSchemaVersion ( )
inlinestatic

access to the version

Definition at line 60 of file TrigConfCoolFolderSpec.h.

◆ getHltChainGroupFolder()

IFolderPtr TrigConfCoolFolderSpec::getHltChainGroupFolder ( cool::IDatabasePtr db)
static

Definition at line 539 of file TrigConfCoolFolderSpec.cxx.

539 {
540 return db->getFolder( "/TRIGGER/HLT/Groups" );
541}

◆ getHltConfKeyFolder()

IFolderPtr TrigConfCoolFolderSpec::getHltConfKeyFolder ( cool::IDatabasePtr db)
static

Definition at line 543 of file TrigConfCoolFolderSpec.cxx.

543 {
544 return db->getFolder( "/TRIGGER/HLT/HltConfigKeys" );
545}

◆ getHltMenuFolder()

IFolderPtr TrigConfCoolFolderSpec::getHltMenuFolder ( cool::IDatabasePtr db)
static

Definition at line 535 of file TrigConfCoolFolderSpec.cxx.

535 {
536 return db->getFolder( "/TRIGGER/HLT/Menu" );
537}

◆ getHltPrescaleKeyFolder()

IFolderPtr TrigConfCoolFolderSpec::getHltPrescaleKeyFolder ( cool::IDatabasePtr db)
static

Definition at line 555 of file TrigConfCoolFolderSpec.cxx.

555 {
556 return db->getFolder( "/TRIGGER/HLT/PrescaleKey" );
557}

◆ getHltPrescalesFolder()

IFolderPtr TrigConfCoolFolderSpec::getHltPrescalesFolder ( cool::IDatabasePtr db)
static

Definition at line 551 of file TrigConfCoolFolderSpec.cxx.

551 {
552 return db->getFolder( "/TRIGGER/HLT/Prescales" );
553}

◆ getLvl1BGContentFolder()

IFolderPtr TrigConfCoolFolderSpec::getLvl1BGContentFolder ( cool::IDatabasePtr db)
static

Definition at line 519 of file TrigConfCoolFolderSpec.cxx.

519 {
520 return db->getFolder( "/TRIGGER/LVL1/BunchGroupContent" );
521}

◆ getLvl1BGDescFolder()

IFolderPtr TrigConfCoolFolderSpec::getLvl1BGDescFolder ( cool::IDatabasePtr db)
static

Definition at line 523 of file TrigConfCoolFolderSpec.cxx.

523 {
524 return db->getFolder( "/TRIGGER/LVL1/BunchGroupDescription" );
525}

◆ getLvl1BGKeyFolder()

IFolderPtr TrigConfCoolFolderSpec::getLvl1BGKeyFolder ( cool::IDatabasePtr db)
static

Definition at line 515 of file TrigConfCoolFolderSpec.cxx.

515 {
516 return db->getFolder( "/TRIGGER/LVL1/BunchGroupKey" );
517}

◆ getLvl1ConfKeyFolder()

IFolderPtr TrigConfCoolFolderSpec::getLvl1ConfKeyFolder ( cool::IDatabasePtr db)
static

Definition at line 507 of file TrigConfCoolFolderSpec.cxx.

507 {
508 return db->getFolder( "/TRIGGER/LVL1/Lvl1ConfigKey" );
509}

◆ getLvl1InputMapFolder()

IFolderPtr TrigConfCoolFolderSpec::getLvl1InputMapFolder ( cool::IDatabasePtr db)
static

Definition at line 527 of file TrigConfCoolFolderSpec.cxx.

527 {
528 return db->getFolder( "/TRIGGER/LVL1/CTPCoreInputMapping" );
529}

◆ getLvl1ItemDefFolder()

IFolderPtr TrigConfCoolFolderSpec::getLvl1ItemDefFolder ( cool::IDatabasePtr db)
static

Definition at line 499 of file TrigConfCoolFolderSpec.cxx.

499 {
500 return db->getFolder( "/TRIGGER/LVL1/ItemDef" );
501}

◆ getLvl1MenuFolder()

IFolderPtr TrigConfCoolFolderSpec::getLvl1MenuFolder ( cool::IDatabasePtr db)
static

Definition at line 495 of file TrigConfCoolFolderSpec.cxx.

495 {
496 return db->getFolder( "/TRIGGER/LVL1/Menu" );
497}

◆ getLvl1MonMapFolder()

IFolderPtr TrigConfCoolFolderSpec::getLvl1MonMapFolder ( cool::IDatabasePtr db)
static

Definition at line 531 of file TrigConfCoolFolderSpec.cxx.

531 {
532 return db->getFolder( "/TRIGGER/LVL1/CTPInMonitoringMapping" );
533}

◆ getLvl1PrescalesFolder()

IFolderPtr TrigConfCoolFolderSpec::getLvl1PrescalesFolder ( cool::IDatabasePtr db)
static

Definition at line 511 of file TrigConfCoolFolderSpec.cxx.

511 {
512 return db->getFolder( "/TRIGGER/LVL1/Prescales" );
513}

◆ getLvl1ThresholdFolder()

IFolderPtr TrigConfCoolFolderSpec::getLvl1ThresholdFolder ( cool::IDatabasePtr db)
static

Definition at line 503 of file TrigConfCoolFolderSpec.cxx.

503 {
504 return db->getFolder( "/TRIGGER/LVL1/Thresholds" );
505}

◆ getMonConfKeyFolder()

IFolderPtr TrigConfCoolFolderSpec::getMonConfKeyFolder ( cool::IDatabasePtr db)
static

Definition at line 547 of file TrigConfCoolFolderSpec.cxx.

547 {
548 return db->getFolder( "/TRIGGER/HLT/MenuAwareMonConfigKey" );
549}

◆ HltChainGroupFolderDefinition()

FolderDefinition TrigConfCoolFolderSpec::HltChainGroupFolderDefinition ( )
static

Definition at line 285 of file TrigConfCoolFolderSpec.cxx.

285 {
286 cool::RecordSpecification rspec;
287 rspec.extend( "ChainCounter", StorageType::UInt32 );
288 rspec.extend( "Groups", StorageType::String4k );
289 FolderDefinition fd( "/TRIGGER/HLT/Groups",
290 FolderVersioning::SINGLE_VERSION,rspec);
291 return fd;
292}

◆ HltConfigKeysFolderDefinition()

FolderDefinition TrigConfCoolFolderSpec::HltConfigKeysFolderDefinition ( )
static

Definition at line 302 of file TrigConfCoolFolderSpec.cxx.

302 {
303 cool::RecordSpecification rspec;
304 rspec.extend( "MasterConfigurationKey", StorageType::UInt32 );
305 rspec.extend( "HltPrescaleConfigurationKey", StorageType::UInt32 );
306 rspec.extend( "ConfigSource", StorageType::String255 );
307 FolderDefinition fd( "/TRIGGER/HLT/HltConfigKeys",
308 FolderVersioning::SINGLE_VERSION,rspec);
309 return fd;
310}

◆ HltMenuFolderDefinition()

FolderDefinition TrigConfCoolFolderSpec::HltMenuFolderDefinition ( )
static

Definition at line 261 of file TrigConfCoolFolderSpec.cxx.

261 {
262 cool::RecordSpecification rspec;
263 rspec.extend( "ChainName", StorageType::String255 );
264 rspec.extend( "ChainVersion", StorageType::UInt32 );
265 rspec.extend( "ChainCounter", StorageType::UInt32 );
266 rspec.extend( "TriggerLevel", StorageType::String255 );
267 rspec.extend( "LowerChainName", StorageType::String4k );
268 rspec.extend( "Prescale", StorageType::Float );
269 rspec.extend( "PassThrough", StorageType::Float );
270 rspec.extend( "TriggerElements", StorageType::String4k );
271 rspec.extend( "StreamInfo", StorageType::String255 );
272 FolderDefinition fd( "/TRIGGER/HLT/Menu",
273 FolderVersioning::SINGLE_VERSION,rspec);
274 return fd;
275}

◆ HltPrescaleKeyFolderDefinition()

FolderDefinition TrigConfCoolFolderSpec::HltPrescaleKeyFolderDefinition ( )
static

Definition at line 338 of file TrigConfCoolFolderSpec.cxx.

338 {
339 cool::RecordSpecification rspec;
340 rspec.extend( "HltPrescaleKey", StorageType::UInt32 );
341 FolderDefinition fd( "/TRIGGER/HLT/PrescaleKey",
342 FolderVersioning::MULTI_VERSION,rspec);
343 return fd;
344}

◆ HltPrescalesFolderDefinition()

FolderDefinition TrigConfCoolFolderSpec::HltPrescalesFolderDefinition ( )
static

Definition at line 320 of file TrigConfCoolFolderSpec.cxx.

320 {
321 cool::RecordSpecification rspec;
322 rspec.extend( "Prescale", StorageType::Float );
323 rspec.extend( "Passthrough", StorageType::Float );
324 rspec.extend( "RerunPrescale", StorageType::Float );
325 FolderDefinition fd( "/TRIGGER/HLT/Prescales",
326 FolderVersioning::MULTI_VERSION,rspec);
327 return fd;
328}

◆ Lvl1BGContentFolderDefinition()

FolderDefinition TrigConfCoolFolderSpec::Lvl1BGContentFolderDefinition ( )
static

Definition at line 213 of file TrigConfCoolFolderSpec.cxx.

213 {
214 cool::RecordSpecification rspec;
215 rspec.extend( "BunchCode" , StorageType::Blob64k );
216 FolderDefinition fd( "/TRIGGER/LVL1/BunchGroupContent",
217 FolderVersioning::MULTI_VERSION,rspec);
218 return fd;
219}

◆ Lvl1BGDescFolderDefinition()

FolderDefinition TrigConfCoolFolderSpec::Lvl1BGDescFolderDefinition ( )
static

Definition at line 229 of file TrigConfCoolFolderSpec.cxx.

229 {
230 cool::RecordSpecification rspec;
231 rspec.extend( "BunchGroup0", StorageType::String255 );
232 rspec.extend( "BunchGroup1", StorageType::String255 );
233 rspec.extend( "BunchGroup2", StorageType::String255 );
234 rspec.extend( "BunchGroup3", StorageType::String255 );
235 rspec.extend( "BunchGroup4", StorageType::String255 );
236 rspec.extend( "BunchGroup5", StorageType::String255 );
237 rspec.extend( "BunchGroup6", StorageType::String255 );
238 rspec.extend( "BunchGroup7", StorageType::String255 );
239 rspec.extend( "BunchGroup8", StorageType::String255 );
240 rspec.extend( "BunchGroup9", StorageType::String255 );
241 rspec.extend( "BunchGroup10", StorageType::String255 );
242 rspec.extend( "BunchGroup11", StorageType::String255 );
243 rspec.extend( "BunchGroup12", StorageType::String255 );
244 rspec.extend( "BunchGroup13", StorageType::String255 );
245 rspec.extend( "BunchGroup14", StorageType::String255 );
246 rspec.extend( "BunchGroup15", StorageType::String255 );
247 rspec.extend( "ItemToBunchGroupMap" ,StorageType::Blob64k );
248 FolderDefinition fd( "/TRIGGER/LVL1/BunchGroupDescription",
249 FolderVersioning::SINGLE_VERSION,rspec);
250 return fd;
251}

◆ Lvl1BGKeyFolderDefinition()

FolderDefinition TrigConfCoolFolderSpec::Lvl1BGKeyFolderDefinition ( )
static

Definition at line 197 of file TrigConfCoolFolderSpec.cxx.

197 {
198 cool::RecordSpecification rspec;
199 rspec.extend( "Lvl1BunchGroupConfigurationKey", StorageType::UInt32 );
200 FolderDefinition fd( "/TRIGGER/LVL1/BunchGroupKey",
201 FolderVersioning::MULTI_VERSION,rspec);
202 return fd;
203}

◆ Lvl1ConfigKeysFolderDefinition()

FolderDefinition TrigConfCoolFolderSpec::Lvl1ConfigKeysFolderDefinition ( )
static

Definition at line 139 of file TrigConfCoolFolderSpec.cxx.

139 {
140 cool::RecordSpecification rspec;
141 rspec.extend( "Lvl1PrescaleConfigurationKey", StorageType::UInt32 );
142 FolderDefinition fd( "/TRIGGER/LVL1/Lvl1ConfigKey",
143 FolderVersioning::MULTI_VERSION,rspec);
144 return fd;
145}

◆ Lvl1InputMapFolderDefinition()

FolderDefinition TrigConfCoolFolderSpec::Lvl1InputMapFolderDefinition ( )
static

Definition at line 175 of file TrigConfCoolFolderSpec.cxx.

175 {
176 cool::RecordSpecification rspec;
177 rspec.extend( "ThresholdName", StorageType::String255 );
178 rspec.extend( "CtpinSlot", StorageType::UChar );
179 rspec.extend( "CtpinConnector", StorageType::UChar );
180 rspec.extend( "ThresholdBit", StorageType::UChar );
181 rspec.extend( "CableBit", StorageType::UChar );
182 rspec.extend( "ThresholdMapping", StorageType::UChar );
183 rspec.extend( "ThresholdActive", StorageType::Bool );
184 FolderDefinition fd( "/TRIGGER/LVL1/CTPCoreInputMapping",
185 FolderVersioning::SINGLE_VERSION,rspec);
186 return fd;
187}

◆ Lvl1ItemDefFolderDefinition()

FolderDefinition TrigConfCoolFolderSpec::Lvl1ItemDefFolderDefinition ( )
static

Definition at line 103 of file TrigConfCoolFolderSpec.cxx.

103 {
104 cool::RecordSpecification rspec;
105
106 rspec.extend( "Logic", StorageType::String255 );
107 rspec.extend( "ConditionsList", StorageType::String4k );
108 FolderDefinition fd( "/TRIGGER/LVL1/ItemDef",
109 FolderVersioning::SINGLE_VERSION,rspec);
110 return fd;
111}

◆ Lvl1MenuFolderDefinition()

FolderDefinition TrigConfCoolFolderSpec::Lvl1MenuFolderDefinition ( )
static

Definition at line 86 of file TrigConfCoolFolderSpec.cxx.

86 {
87 cool::RecordSpecification rspec;
88 rspec.extend( "ItemName", StorageType::String255 );
89 rspec.extend( "ItemVersion", StorageType::UInt32 );
90 FolderDefinition fd( "/TRIGGER/LVL1/Menu",
91 FolderVersioning::SINGLE_VERSION, rspec);
92 return fd;
93}

◆ Lvl1MonMapFolderSpecification()

FolderDefinition TrigConfCoolFolderSpec::Lvl1MonMapFolderSpecification ( )
static

Definition at line 358 of file TrigConfCoolFolderSpec.cxx.

358 {
359 RecordSpecification rspec;
360 rspec.extend( "CounterType", StorageType::String255 );
361 rspec.extend( "BunchGroupId", StorageType::UChar );
362 rspec.extend( "ThresholdName", StorageType::String255 );
363 rspec.extend( "CtpinSlot", StorageType::String255 );
364 rspec.extend( "CtpinConnector", StorageType::String255 );
365 rspec.extend( "Multiplicity", StorageType::String255 );
366 rspec.extend( "ThresholdBitStart", StorageType::String255 );
367 rspec.extend( "ThresholdBitEnd", StorageType::String255 );
368 rspec.extend( "ThresholdActive", StorageType::String255 );
369 rspec.extend( "CounterName", StorageType::String255 );
370 rspec.extend( "CounterLogic", StorageType::String255 );
371 FolderDefinition fd("/TRIGGER/LVL1/CTPInMonitoringMapping",
372 FolderVersioning::SINGLE_VERSION, rspec);
373 return fd;
374}

◆ Lvl1PrescalesFolderDefinition()

FolderDefinition TrigConfCoolFolderSpec::Lvl1PrescalesFolderDefinition ( int schemaVersion)
static

Definition at line 155 of file TrigConfCoolFolderSpec.cxx.

155 {
156 cool::RecordSpecification rspec;
157 if(schemaVersion<4) {
158 rspec.extend( "Lvl1Prescale", StorageType::Int32 );
159 } else if(schemaVersion>=4) {
160 rspec.extend( "Lvl1Prescale", StorageType::Int64 );
161 }
162 FolderDefinition fd( "/TRIGGER/LVL1/Prescales",
163 FolderVersioning::MULTI_VERSION,rspec);
164 return fd;
165}

◆ Lvl1ThresholdFolderDefinition()

FolderDefinition TrigConfCoolFolderSpec::Lvl1ThresholdFolderDefinition ( )
static

Definition at line 121 of file TrigConfCoolFolderSpec.cxx.

121 {
122 cool::RecordSpecification rspec;
123 rspec.extend( "Threshold", StorageType::String255 );
124 rspec.extend( "ThresholdValue", StorageType::String4k );
125 rspec.extend( "Cable", StorageType::String255 );
126 FolderDefinition fd( "/TRIGGER/LVL1/Thresholds",
127 FolderVersioning::SINGLE_VERSION,rspec);
128 return fd;
129}

◆ printFolderStructure()

void TrigConfCoolFolderSpec::printFolderStructure ( cool::IDatabasePtr db,
std::ostream & o )
static

prints the folder structure that is in the COOL database

Parameters
dbCOOL database
ooutput stream

Definition at line 564 of file TrigConfCoolFolderSpec.cxx.

565{
566
567 for(const string& node : db->listAllNodes()) {
568 bool isFolderSet = db->existsFolderSet(node);
569 o << " " << node;
570 if(isFolderSet)
571 o << "/" << endl;
572 else {
573 IFolderPtr folder = db->getFolder(node);
574 bool isMultiVersion = (folder->versioningMode() == FolderVersioning::MULTI_VERSION);
575 const IRecordSpecification& rspec = folder->payloadSpecification();
576 o << " (" << (isMultiVersion?"Multiversion":"Singleversion") << ")" << endl;
577 o.setf(ios::left);
578 for(uint i=0;i<rspec.size(); i++) {
579 o << " " << setw(30) << rspec[i].name()
580 << " (" << rspec[i].storageType().name() << ")" << endl;
581 }
582 }
583 }
584 return;
585}
unsigned int uint

◆ readSchemaVersion()

int TrigConfCoolFolderSpec::readSchemaVersion ( cool::IDatabasePtr db)
static

get the version of the COOL database

Definition at line 32 of file TrigConfCoolFolderSpec.cxx.

32 {
33
34 // version 4:
35 // L1 prescales are Int64
36
37 const IFolderPtr & l1prescaleFolder = db->getFolder("/TRIGGER/LVL1/Prescales");
38 const IRecordSpecification & l1psSpec = l1prescaleFolder->payloadSpecification();
39 const IFieldSpecification& l1psfield = l1psSpec["Lvl1Prescale"];
40 if(l1psfield.storageType() == StorageType::Int64) {
41 return 4;
42 }
43
44 const IFolderPtr & hltMenuFolder = db->getFolder("/TRIGGER/HLT/Menu");
45 const IRecordSpecification & hltMenuSpec = hltMenuFolder->payloadSpecification();
46
47 if(hltMenuSpec.exists("Prescale")) {
48
49 const IFieldSpecification& lowChNField = hltMenuSpec["LowerChainName"];
50
51 // version 3:
52 // hlt menu has long (4000 char) lower chain name field
53 if(lowChNField.storageType() == StorageType::String4k) {
54 return 3;
55 }
56
57 const IFieldSpecification& psField = hltMenuSpec["Prescale"];
58
59 // version 1:
60 // hlt menu has integer prescale and pass_through values
61 if(psField.storageType() == StorageType::UInt32) {
62 return 1;
63 }
64
65 // version 2:
66 // hlt menu has float prescale and pass_through values
67 if(psField.storageType() == StorageType::Float) {
68 return 2;
69 }
70 }
71
72 // should never happen
73 throw runtime_error("Could not determine the COOL schema of the TriggerDB");
74
75 return -1;
76}

Member Data Documentation

◆ mBGContentBlobSize

const long TrigConf::TrigConfCoolFolderSpec::mBGContentBlobSize = 3564
static

Definition at line 195 of file TrigConfCoolFolderSpec.h.

◆ mBGDescBlobSize

const long TrigConf::TrigConfCoolFolderSpec::mBGDescBlobSize = 512
static

Definition at line 194 of file TrigConfCoolFolderSpec.h.

◆ mDefaultSchemaVersion

const int TrigConf::TrigConfCoolFolderSpec::mDefaultSchemaVersion = 3
static

Definition at line 193 of file TrigConfCoolFolderSpec.h.


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