+ else {
+
+ AliError("NO DCS/DCSv2 OCDB entry found!");
+
+ }
+
+}
+
+//_____________________________________________________________________________
+Int_t AliTRDcalibDB::GetNumberOfParsDCS(TString cname, Char_t delimiter)
+{
+ // Get the number of configuration parameters from the DCS config
+
+ //AliInfo(Form("\"%s\" tokenized by \"%c\"", cname.Data(), delimiter));
+ if(!cname.Length()) return -1; // -1 for the "cf"
+ Int_t nconf(0);
+ for(Int_t ich(1); ich<cname.Length()-1; ich++){ if(cname[ich]==delimiter) nconf++;}
+ return nconf;
+}
+
+//_____________________________________________________________________________
+Int_t AliTRDcalibDB::GetNumberOfOptsDCS(TString cname, Int_t cfgType)
+{
+ // Get the number of options of a given configuration parameter from DCS
+
+ Char_t cdelim = '_', // define the delimiters
+ odelim = '-';
+ Int_t nconfig = GetNumberOfParsDCS(cname, cdelim);
+
+ // protect
+ if ((nconfig == -1) || (nconfig < cfgType)) {
+ AliError("Not enough parameters in DCS configuration name!");
+ return 0;
+ }
+
+ TObjArray *carr = cname.Tokenize(cdelim);
+ Int_t nopt = GetNumberOfParsDCS(((TObjString*)carr->At(cfgType))->GetString(), odelim);
+ carr->Delete(); delete carr;
+ return nopt;
+}
+
+//_____________________________________________________________________________
+void AliTRDcalibDB::GetDCSConfigParOption(TString cname, Int_t cfgType, Int_t option, TString &cfgo)
+{
+ //
+ // Get a configuration (see enum in header file) or the options of a configuration
+ // option == 0 returns the configuration itself
+ // option > 0 returns the optional parameter Nr. (option) of the configuration (cfgType)
+ //
+
+ Char_t cdelim = '_', // define the delimiters
+ odelim = '-';
+
+ Int_t nconfig = GetNumberOfParsDCS(cname, cdelim);
+ // protect
+ if (nconfig == -1) {
+ AliError("DCS configuration name empty!");
+ cfgo = "";
+ return;
+ } else if (nconfig < cfgType) {
+ AliError("Not enough parameters in DCS configuration name!");
+ cfgo = "";
+ return;
+ }
+
+ TObjArray *carr = cname.Tokenize(cdelim);
+ TString cfgString(((TObjString*)carr->At(cfgType))->GetString());
+ Int_t noptions = GetNumberOfParsDCS(cfgString, odelim);
+ // protect
+ if (noptions < option) {
+ AliError("Not enough options in DCS configuration name!");
+ cfgo = "";
+ carr->Delete(); delete carr;
+ return;
+ }
+ TObjArray *oarr = cfgString.Tokenize(odelim);
+ cfgo = ((TObjString*)oarr->At(option))->GetString();
+ carr->Delete(); delete carr;
+ oarr->Delete(); delete oarr;
+ return;
+
+}
+
+//_____________________________________________________________________________
+Bool_t AliTRDcalibDB::HasOnlineFilterPedestal()
+{
+ //
+ // Checks whether pedestal filter was applied online
+ //
+
+ TString filterconfig;
+ GetFilterType(filterconfig);
+
+ return filterconfig.Contains("p");
+
+}
+
+//_____________________________________________________________________________
+Bool_t AliTRDcalibDB::HasOnlineFilterGain()
+{
+ //
+ // Checks whether online gain filter was applied
+ //
+
+ TString filterconfig;
+ GetFilterType(filterconfig);
+
+ return filterconfig.Contains("g");
+
+}
+
+//_____________________________________________________________________________
+Bool_t AliTRDcalibDB::HasOnlineTailCancellation()
+{
+ //
+ // Checks whether online tail cancellation was applied
+ //
+
+ TString filterconfig;
+ GetFilterType(filterconfig);
+
+ return filterconfig.Contains("t");