ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConfCoolFolderSpec.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5// ============================================================
6// filename: TrigConfCoolFolderSpec.cpp
7// package: Trigger/TrigConfStorage
8// project: AtlasTrigger
9//
10// author: Joerg Stelzer <stelzer@cern.ch>
11//
12// purpose: this class defines the COOL folder structure of the
13// trigger configuration (LVL1 and HLT)
14//
15// ============================================================
16
17#ifndef TrigConfCoolFolderSpec_h
18#define TrigConfCoolFolderSpec_h
19
20#include <iostream>
21#include <vector>
22#include <map>
23
24#include "CoolKernel/pointers.h"
25#include "CoolKernel/FolderVersioning.h"
26#include "CoolKernel/FolderSpecification.h"
27
28#include <sys/types.h>
29
30#include <stdint.h>
31
32namespace cool {
33 class RecordSpecification;
34 class IRecordSpecification;
35}
36
37namespace TrigConf {
38
39
41 public:
42 FolderDefinition(const std::string& folder, cool::FolderVersioning::Mode mode, const cool::RecordSpecification& rspec) :
43 folder(folder), fspec(mode,rspec) { }
44 std::string folder;
45 cool::FolderSpecification fspec;
46 cool::RecordSpecification m_rspec;
47 cool::RecordSpecification& rspec() { return m_rspec; }
48 // const cool::RecordSpecification& rspec() { return fspec->payloadSpecification(); }
49 };
50
51
54 public:
55
57 static int readSchemaVersion(cool::IDatabasePtr db);
58
61
67 static cool::IFolderSetPtr createFolderStructure(cool::IDatabasePtr db, int schemaVersion = 0);
68
74 static cool::IFolderSetPtr createMonFolderStructure(cool::IDatabasePtr db, int schemaVersion = 0);
75
81 static void printFolderStructure(cool::IDatabasePtr db, std::ostream & o);
82
83
84
85
86 // /TRIGGER/LVL1/Menu
87 static cool::IFolderPtr getLvl1MenuFolder(cool::IDatabasePtr db);
88
89
90 // /TRIGGER/LVL1/ItemDef
91 static cool::IFolderPtr getLvl1ItemDefFolder(cool::IDatabasePtr db);
92
93
94 // /TRIGGER/LVL1/Threshold
95 static cool::IFolderPtr getLvl1ThresholdFolder(cool::IDatabasePtr db);
96
97
98 // /TRIGGER/LVL1/Lvl1ConfigKey
99 static cool::IFolderPtr getLvl1ConfKeyFolder(cool::IDatabasePtr db);
100
101
102 // /TRIGGER/LVL1/Prescales
103 static cool::IFolderPtr getLvl1PrescalesFolder(cool::IDatabasePtr db);
104
105
106 // /TRIGGER/LVL1/BunchGroupKey
107 static cool::IFolderPtr getLvl1BGKeyFolder(cool::IDatabasePtr db);
108
109
110 // /TRIGGER/LVL1/BunchGroupContent
111 static cool::IFolderPtr getLvl1BGContentFolder(cool::IDatabasePtr db);
112
113
114 // /TRIGGER/LVL1/BunchGroupDescription
115 static cool::IFolderPtr getLvl1BGDescFolder(cool::IDatabasePtr db);
116
117
118 // /TRIGGER/LVL1/CTPCoreInputMapping
119 static cool::IFolderPtr getLvl1InputMapFolder(cool::IDatabasePtr db);
120
121
122 // /TRIGGER/LVL1/CTPInMonitoringMapping
123 static cool::IFolderPtr getLvl1MonMapFolder(cool::IDatabasePtr db);
124
125
126 // /TRIGGER/HLT/Menu
127 static cool::IFolderPtr getHltMenuFolder(cool::IDatabasePtr db);
128
129
130 // /TRIGGER/HLT/Menu
131 static cool::IFolderPtr getHltChainGroupFolder(cool::IDatabasePtr db);
132
133
134 // /TRIGGER/HLT/HltConfigKeys
135 static cool::IFolderPtr getHltConfKeyFolder(cool::IDatabasePtr db);
136
137
138 // /TRIGGER/HLT/MenuAwareMonConfigKey
139 static cool::IFolderPtr getMonConfKeyFolder(cool::IDatabasePtr db);
140
141
142 // /TRIGGER/HLT/Prescales
143 static cool::IFolderPtr getHltPrescalesFolder(cool::IDatabasePtr db);
144
145
146 // /TRIGGER/HLT/PrescaleKey
147 static cool::IFolderPtr getHltPrescaleKeyFolder(cool::IDatabasePtr db);
148
149
150 // returns version number
151 static int determineSchemaVersion(const std::vector<cool::IFolderPtr> & folders);
152
153
154 static bool CreateFolderIfNotExist(cool::IDatabasePtr db, const std::string& folder, const cool::IRecordSpecification& spec,
155 cool::FolderVersioning::Mode mode, bool isMultiChannel);
156
157 static bool CreateFolderIfNotExist(cool::IDatabasePtr db, FolderDefinition fd, bool isMultiChannel);
158
159
164 static FolderDefinition Lvl1PrescalesFolderDefinition(int schemaVersion);
175
176
177 static cool::RecordSpecification createLvl1MenuFolderSpecification();
178 static cool::RecordSpecification createLvl1ItemDefFolderSpecification();
179 static cool::RecordSpecification createLvl1ThresholdFolderSpecification();
180 static cool::RecordSpecification createLvl1ConfigKeysFolderSpecification();
181 static cool::RecordSpecification createLvl1PrescalesFolderSpecification(int schemaVersion);
182 static cool::RecordSpecification createLvl1InputMapFolderSpecification();
183 static cool::RecordSpecification createLvl1MonMapFolderSpecification();
184 static cool::RecordSpecification createLvl1BGKeyFolderSpecification();
185 static cool::RecordSpecification createLvl1BGContentFolderSpecification();
186 static cool::RecordSpecification createLvl1BGDescFolderSpecification();
187 static cool::RecordSpecification createHltMenuFolderSpecification();
188 static cool::RecordSpecification createHltChainGroupFolderSpecification();
189 static cool::RecordSpecification createHltConfigKeysFolderSpecification();
190 static cool::RecordSpecification createHltPrescalesFolderSpecification();
191 static cool::RecordSpecification createHltPrescaleKeyFolderSpecification();
192
193 const static int mDefaultSchemaVersion;
194 const static long mBGDescBlobSize;
195 const static long mBGContentBlobSize;
196
197 private:
200
203
204 };
205
206} // end namespace TrigConf
207
208#endif
cool::RecordSpecification m_rspec
cool::FolderSpecification fspec
FolderDefinition(const std::string &folder, cool::FolderVersioning::Mode mode, const cool::RecordSpecification &rspec)
cool::RecordSpecification & rspec()
static cool::RecordSpecification createHltMenuFolderSpecification()
defines the folder structure for the HLT menu
static FolderDefinition HltPrescalesFolderDefinition()
static cool::IFolderSetPtr createMonFolderStructure(cool::IDatabasePtr db, int schemaVersion=0)
creates the folder structure in the monitoring COOL database
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::IFolderPtr getHltPrescaleKeyFolder(cool::IDatabasePtr db)
static void printFolderStructure(cool::IDatabasePtr db, std::ostream &o)
prints the folder structure that is in the COOL database
static cool::RecordSpecification createLvl1ThresholdFolderSpecification()
defines the folder structure for the LVL1 thresholds
static cool::RecordSpecification createLvl1MenuFolderSpecification()
defines the folder structure for the LVL1 menu
static FolderDefinition Lvl1ItemDefFolderDefinition()
static cool::IFolderPtr getHltChainGroupFolder(cool::IDatabasePtr db)
static cool::RecordSpecification createLvl1ConfigKeysFolderSpecification()
defines the folder structure for the LVL1 config key
static cool::IFolderPtr getLvl1ConfKeyFolder(cool::IDatabasePtr db)
static cool::RecordSpecification createHltPrescalesFolderSpecification()
defines the folder structure for the HLT prescales
static cool::RecordSpecification createLvl1BGKeyFolderSpecification()
defines the folder structure for the LVL1 bunch group key
static cool::IFolderPtr getHltMenuFolder(cool::IDatabasePtr db)
static FolderDefinition Lvl1BGDescFolderDefinition()
static FolderDefinition Lvl1BGKeyFolderDefinition()
static int readSchemaVersion(cool::IDatabasePtr db)
get the version of the COOL database
static cool::IFolderPtr getMonConfKeyFolder(cool::IDatabasePtr db)
static FolderDefinition HltPrescaleKeyFolderDefinition()
static cool::RecordSpecification createLvl1ItemDefFolderSpecification()
defines the folder structure for the LVL1 item def
static FolderDefinition Lvl1ConfigKeysFolderDefinition()
static int determineSchemaVersion(const std::vector< cool::IFolderPtr > &folders)
static cool::RecordSpecification createLvl1BGDescFolderSpecification()
defines the folder structure for the LVL1 bunch group descriptions
static cool::RecordSpecification createLvl1PrescalesFolderSpecification(int schemaVersion)
defines the folder structure for the LVL1 prescales
static cool::IFolderPtr getLvl1ItemDefFolder(cool::IDatabasePtr db)
static cool::IFolderPtr getLvl1BGContentFolder(cool::IDatabasePtr db)
static cool::IFolderPtr getHltConfKeyFolder(cool::IDatabasePtr db)
static FolderDefinition Lvl1MonMapFolderSpecification()
static FolderDefinition Lvl1BGContentFolderDefinition()
static FolderDefinition HltMenuFolderDefinition()
static cool::IFolderPtr getLvl1PrescalesFolder(cool::IDatabasePtr db)
static int getDefaultSchemaVersion()
access to the version
static FolderDefinition Lvl1ThresholdFolderDefinition()
static cool::IFolderSetPtr createFolderStructure(cool::IDatabasePtr db, int schemaVersion=0)
creates the folder structure in the COOL database
static cool::IFolderPtr getLvl1MonMapFolder(cool::IDatabasePtr db)
static cool::RecordSpecification createLvl1BGContentFolderSpecification()
defines the folder structure for the LVL1 bunch groups
static FolderDefinition Lvl1PrescalesFolderDefinition(int schemaVersion)
static cool::IFolderPtr getLvl1BGDescFolder(cool::IDatabasePtr db)
static cool::IFolderPtr getLvl1BGKeyFolder(cool::IDatabasePtr db)
static cool::IFolderPtr getLvl1ThresholdFolder(cool::IDatabasePtr db)
static cool::RecordSpecification createHltChainGroupFolderSpecification()
defines the folder structure for the HLT chain groups
TrigConfCoolFolderSpec(const TrigConfCoolFolderSpec &)
copy constructor
static FolderDefinition HltChainGroupFolderDefinition()
static cool::IFolderPtr getLvl1InputMapFolder(cool::IDatabasePtr db)
static cool::RecordSpecification createHltPrescaleKeyFolderSpecification()
defines the folder structure for the HLT prescales
static FolderDefinition Lvl1InputMapFolderDefinition()
static cool::IFolderPtr getLvl1MenuFolder(cool::IDatabasePtr db)
static bool CreateFolderIfNotExist(cool::IDatabasePtr db, FolderDefinition fd, bool isMultiChannel)
static cool::RecordSpecification createHltConfigKeysFolderSpecification()
defines the folder structure for the HLT config key
static FolderDefinition Lvl1MenuFolderDefinition()
static bool CreateFolderIfNotExist(cool::IDatabasePtr db, const std::string &folder, const cool::IRecordSpecification &spec, cool::FolderVersioning::Mode mode, bool isMultiChannel)
static cool::IFolderPtr getHltPrescalesFolder(cool::IDatabasePtr db)
static FolderDefinition HltConfigKeysFolderDefinition()
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22