Possibility to create trigger configuration from a custom file
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Dec 2007 14:52:44 +0000 (14:52 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Dec 2007 14:52:44 +0000 (14:52 +0000)
STEER/AliTriggerConfiguration.cxx

index e318ce1..1608f85 100755 (executable)
@@ -510,10 +510,16 @@ AliTriggerConfiguration* AliTriggerConfiguration::LoadConfiguration( TString & c
   // The filename is constructed as: GRP/CTP/<configuration>.cfg
 
    // Load the selected configuration
-   TString filename = gSystem->Getenv("ALICE_ROOT");
-   filename += "/GRP/CTP/";
-   filename += configuration;
-   filename += ".cfg";
+  TString filename;
+  if (configuration.EndsWith(".cfg")) {
+    filename = configuration;
+  }
+  else {
+    filename = gSystem->Getenv("ALICE_ROOT");
+    filename += "/GRP/CTP/";
+    filename += configuration;
+    filename += ".cfg";
+  }
 
    if( gSystem->AccessPathName( filename.Data() ) ) {
       AliErrorClass( Form( "file (%s) not found", filename.Data() ) );