Changing handling of the errors according to discussion following
[u/mrichter/AliRoot.git] / GRP / MakeCTPDummyEntries.C
1 void MakeCTPDummyEntries(){
2
3         // macro to put in OCDB the dummy entries for CTP configuration and scalers
4
5         AliCDBManager *man = AliCDBManager::Instance();
6         man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
7         Char_t * filenameConfig = gSystem->ExpandPathName("$ALICE_ROOT/GRP/CTP/p-p.cfg");
8         Char_t * filenameScalers = gSystem->ExpandPathName("$ALICE_ROOT/GRP/CTP/xcounters.txt");
9
10         AliTriggerConfiguration *runcfg = AliTriggerConfiguration::LoadConfiguration(filenameConfig);
11         AliTriggerRunScalers *scalers = AliTriggerRunScalers::ReadScalers(filenameScalers);
12
13         AliCDBMetaData* metaconfig = new AliCDBMetaData();
14         metaconfig->SetResponsible("Roman Lietava");
15         metaconfig->SetComment("Dummy CTP configuration for standalone runs");
16         AliCDBId idconfig("GRP/CTP/DummyConfig",0,AliCDBRunRange::Infinity());
17         man->Put(runcfg,idconfig, metaconfig);
18
19         AliCDBMetaData* metascalers = new AliCDBMetaData();
20         metascalers->SetResponsible("Roman Lietava");
21         metascalers->SetComment("Dummy CTP scalers for standalone runs");
22         AliCDBId idscalers("GRP/CTP/DummyScalers",0,AliCDBRunRange::Infinity());
23         man->Put(scalers,idscalers, metascalers);
24         return;
25 }