]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Possibility to set a run number
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 23 Nov 2007 11:32:42 +0000 (11:32 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 23 Nov 2007 11:32:42 +0000 (11:32 +0000)
RAW/dateStream.cxx

index 7077e02a9a8dbd13dfe92743ed9c2127c37f28a4..818b5755a0b52f9fa3ace95239a8dc82b1db1d84 100644 (file)
@@ -1341,6 +1341,12 @@ void parseArgs( int argc, char **argv ) {
       handleCDH = TRUE;
     } else if ( strcmp( "-D", argv[ arg ] ) == 0 ) {
       bufferData = FALSE;
+    } else if ( strcmp( "-run", argv[ arg ] ) == 0 ) {
+      int runnumber;
+      if ( ++arg == argc ) exit( usage() );
+      if ( sscanf( argv[ arg ], "%d", &runnumber ) != 1 ) exit( usage() );
+      if ( runnumber < 0 ) exit( usage() );
+      currRunNb = runnumber;
     } else {
       fprintf( stderr, "%s: Unknown switch \"%s\"\n", myName, argv[argc] );
       exit( usage() );
@@ -1698,7 +1704,7 @@ void initVars() {
   currLdc = NULL;
   currEvent = NULL;
   payloadsHead = payloadsTail = NULL;
-  currRunNb = 1;
+  currRunNb = -1;
   numOfLdcs = 0;
   numOfEvents = 1;
   createSorEor = TRUE;