Analysis with TRestManager seems to work but no output

REST version : v2.2.11 (master)

Hello,

I am trying to run an analysis on my simulation output. I am running some simple analysis rml file that should only implement the TRestGeant4AnalysisProcess process.

However after running the command (restManager --c analysis.rml) no output file is produced, even though input/output file seem to be correct according to the console message. I have tried using the --i/–o to set the files from the prompt with the same negative results.

The prompt output does not suggest any error and it seems everything is correct but no output is generated.

console output:

lobis@sultan:~/gitlab/IAXOD0-REST/restG4_simulations/analysis/manager$ restManager --c basicAnalysisManager.rml --o test.root

                                                               Launching TRestManager...                                                                
                                                    
-- Debug : Loading Config for : TRestManager                                                        
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : into child elements of: TRestManager                                                     
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : into child elements of: globals                                                          
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : TRestManager: Parameter : store not found!                                               
-- Debug : Loading Config for : TRestRun                                                            
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : into child elements of: TRestRun                                                         
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandIncludeFile(TiXmlElement*)                        
-- Debug : filename to expand : /home/lobis/gitlab/IAXOD0-REST//restG4_simulations/analysis//read...
-- Debug : TRestRun: Parameter : store not found!                                                   
-- Debug : Initializing TRestRun from config file, version: 2.2.11                                  
-- Debug : Loading Config for : TRestGas                                                            
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandIncludeFile(TiXmlElement*)                        
-- Debug : filename to expand : /home/lobis/apps/REST/REST_stable/v2.2.11/install/data/definition...
----------------------------------------------------------------------------------------------------
-- Debug : Target xml element spotted                                                               
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : into child elements of: TRestGas                                                         
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
<TRestGas name="Argon-Isobutane 2Pct 10-10E3Vcm" pressure="3" file="/home/lobis/apps/REST/REST_stable/v2.2.11/install/data/definitions/gases.rml" title="Argon-Isobutane Mixture (2Pct Isobutane)" expanded="true">
    <variable name="EXPERIMENT" value="IAXOD0" overwrite="false" />
    <variable name="VERSION" value="2.11" overwrite="false" />
    <variable name="IAXOD0_PATH" value="/home/lobis/gitlab/IAXOD0-REST/" overwrite="true" />
    <variable name="IAXOD0_DATAPATH" value="/home/lobis/gitlab/IAXOD0-REST//simulations_data/cosmic_muons" overwrite="false" />
    <variable name="IAXOD0_G4PATH" value="/home/lobis/gitlab/IAXOD0-REST//restG4_simulations/restG4/" overwrite="true" />
    <variable name="IAXOD0_GEOPATH" value="/home/lobis/gitlab/IAXOD0-REST//geometry/" overwrite="true" />
    <variable name="IAXOD0_GEODIR" value="/home/lobis/gitlab/IAXOD0-REST//geometry//Argon" overwrite="true" />
    <variable name="IAXODO_ANALYSIS_PATH" value="/home/lobis/gitlab/IAXOD0-REST//restG4_simulations/analysis/" overwrite="true" />
    <variable name="IAXOD0_GAS" value="Argon-Isobutane 2Pct 10-10E3V/cm" overwrite="true" />
    <variable name="DIR_DATA" value="SourceInPipe" overwrite="true" />
    <variable name="FILE_FORMAT" value="test_multifeminos.root" overwrite="true" />
    <parameter name="mainDataPath" value="${IAXOD0_DATAPATH}" />
    <parameter name="gasDataPath" value="${REST_PATH}/data/gasFiles/" />
    <parameter name="verboseLevel" value="debug" />
    <searchPath value="${REST_INPUTDATA}/definitions/" />
    <searchPath value="${REST_INPUTDATA}/gasFiles/" />
    <parameter name="pressure" value="1" />
    <parameter name="temperature" value="293.15" />
    <parameter name="maxElectronEnergy" value="400" />
    <parameter name="W_value" value="26.238" />
    <parameter name="nCollisions" value="10" />
    <eField Emin="10" Emax="1000" nodes="20" />
    <gasComponent name="ar" fraction="0.98" />
    <gasComponent name="iC4H10" fraction="0.02" />
</TRestGas>
-- Debug : 1 attributes and 8 xml elements added by inclusion                                       
----------------------------------------------------------------------------------------------------
-- Debug : TRestGas: Parameter : store not found!                                                   
-- Debug : Entering ... TRestGas::InitFromConfigFile()                                              
-- Debug : TRestGas: Parameter : gasOutputPath not found!                                           
-- Debug : TRestGas: Parameter : GDMLMaterialRef not found!                                         
-- Debug : TRestGas: Parameter : gasServer not found!                                               
-- Debug : Entering ... TRestGas::AddGasComponent( gasName=ar , fraction=0.98 )                     
-- Debug : Entering ... TRestGas::AddGasComponent( gasName=iC4H10 , fraction=0.02 )                 
-- Debug : TRestGas: Parameter : generate not found!                                                
-- Debug : TRestGas: Parameter : generate not found!                                                
-- Debug : Entering ... TRestGas::ConstructFilename( )                                              
-- Debug : Constructed filename : ar_98.0-iC4H10_2.0-E_vs_P_10.0_1000.0_nodes_20-nCol_10-maxE_400...
-- Debug : TRestGas::InitFromConfigFile. ConstructFilename. fGasFilename = ar_98.0-iC4H10_2.0-E_v...
-- Debug : Entering ... TRestGas::FindGasFile( name=ar_98.0-iC4H10_2.0-E_vs_P_10.0_1000.0_nodes_2...
-- Debug : Launching ... wget --no-check-certificate https://sultan.unizar.es/gasFiles//ar_98.0-i...
-- Info : Trying to download gasFile ar_98.0-iC4H10_2.0-E_vs_P_10.0_1000.0_nodes_20-nCol_10-maxE_...
-- Debug : Command output : 0                                                                       
-- Success : download OK!                                                                           
-- Debug : TRestGas::InitFromConfigFile. FindGasFile. fGasFilename = /tmp/restGas_lobis_Download.gas
-- Debug : Entering ... TRestGas::PrintGasInfo( )                                                   
                          ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                          
                          ||                                        TRestGas content                                        ||                          
                          ||                                       Config file : null                                       ||                          
                          ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++                          
                          ||                             Name : Argon-Isobutane 2Pct 10-10E3Vcm                             ||                          
                          ||                        Title : Argon-Isobutane Mixture (2Pct Isobutane)                        ||                          
                          ||                                        Version : 2.2.11                                        ||                          
                          ----------------------------------------------------------------------------------------------------                          
                          ||                                 Status : Configuration loaded                                  ||                          
                          ||                           Gas filename : restGas_lobis_Download.gas                            ||                          
                          ||                                        Pressure : 3 atm                                        ||                          
                          ||                                     Temperature : 293.15 K                                     ||                          
                          ||                                      W-value : 26.238 eV                                       ||                          
                          ||                                 Max. Electron energy : 400 eV                                  ||                          
                          ||                                     Field grid nodes : 20                                      ||                          
                          ||                               Efield range : ( 10 , 1000 ) V/cm                                ||                          
                          ||                                      Number of Gases : 2                                       ||                          
                          ||                             Gas id : 0, Name : ar, Fraction : 0.98                             ||                          
                          ||                           Gas id : 1, Name : iC4H10, Fraction : 0.02                           ||                          
                          ****************************************************************************************************                          
                                                    
                                                    
****************************************************************************************************
-- Info : opening... /home/lobis/gitlab/IAXOD0-REST/simulations_data/cosmic_muons/RUN_SIMULATION_...
-- Debug : begin collecting file info: /home/lobis/gitlab/IAXOD0-REST/simulations_data/cosmic_muo...
-- Debug : begin matching file names                                                                
-- Debug : TRestRun: Parameter : inputFormat not found!                                             
Info in <TGeoManager::CloseGeometry>: Geometry loaded from file...
Info in <TGeoManager::SetTopVolume>: Top volume is World. Master volume is World
Info in <TGeoNavigator::BuildCache>: --- Maximum geometry depth set to 100
Info in <TGeoManager::Voxelize>: Voxelizing...
Info in <TGeoManager::CountLevels>: max level = 1, max placements = 22
Info in <TGeoManager::CloseGeometry>: 23 nodes/ 23 volume UID's in Geometry imported from GDML
Info in <TGeoManager::CloseGeometry>: ----------------modeler ready----------------
-- Debug : Initializing input file : version code : 131595                                          
-- Debug : Input file version : 2.2.11                                                              
-- Debug : Finding TRestAnalysisTree..                                                              
-- Debug : Finding event branch..                                                                   
-- Debug : found event branch of event type: TRestG4Event                                           
                          InputFile pattern : "/home/lobis/gitlab/IAXOD0-REST/simulations_data/cosmic_muons/RUN_SIMULATION_...                          
                             OutputFile pattern : "/home/lobis/gitlab/IAXOD0-REST//simulations_data/cosmic_muons/test.root"                             
****************************************************************************************************
-- Debug : Loading Config for : TRestGeant4AnalysisProcess                                          
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : into child elements of: addProcess                                                       
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : Entering ... void TRestMetadata::ExpandElement(TiXmlElement*, bool)                      
-- Debug : TRestGeant4AnalysisProcess: Parameter : title not found!                                 
-- Debug : TRestGeant4AnalysisProcess: Parameter : store not found!                                 
-- Debug : TRestGeant4AnalysisProcess: Parameter : outputLevel not found!                           
-- Debug : TRestGeant4AnalysisProcess: Parameter : observable not found!                            
-- Debug : TRestGeant4AnalysisProcess: Parameter : cutsEnabled not found!                           
-- Debug : TRestGeant4AnalysisProcess: Parameter : lowEnergyCut not found!                          
-- Debug : TRestGeant4AnalysisProcess: Parameter : highEnergyCut not found!                         
****************************************************************************************************
-- Debug : Setting input event.. Type: TRestG4Event Address: 0x55950fe622a0                         
****************************************************************************************************
                                                                         Done!

rml file:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>

<TRestManager name="RESTManagerSim" title="Template manager to process a simulation generated by restG4.">
    <!-- Global parameters -->
    <globals>
        <!-- Environment -->
        <variable name="EXPERIMENT" value="IAXOD0" overwrite="false"/>
        <variable name="VERSION" value="2.11" overwrite="false"/>
        <variable name="IAXOD0_PATH" value="/home/lobis/gitlab/IAXOD0-REST/" overwrite="true"/>
        <variable name="IAXOD0_DATAPATH" value="${IAXOD0_PATH}/simulations_data/cosmic_muons" overwrite="false"/>
        <variable name="IAXOD0_G4PATH" value="${IAXOD0_PATH}/restG4_simulations/restG4/" overwrite="true"/>
        <variable name="IAXOD0_GEOPATH" value="${IAXOD0_PATH}/geometry/" overwrite="true"/>
        <variable name="IAXOD0_GEODIR" value="${IAXOD0_GEOPATH}/Argon" overwrite="true"/>   <!-- options "Argon" or "Xenon" -->
        <variable name="IAXODO_ANALYSIS_PATH" value="${IAXOD0_PATH}/restG4_simulations/analysis/" overwrite="true"/> 
        <variable name="IAXOD0_GAS" value="Argon-Isobutane 2Pct 10-10E3V/cm"
                  overwrite="true"/>  <!-- options "Argon-Isobutane 2Pct 10-10E3V/cm", "Xenon-Isobutane 2Pct 10-10E3V/cm" or any other gas in gases.rml file-->
        <!-- Default for G4 simulations (defined in .sh script)-->
        <variable name="DIR_DATA" value="SourceInPipe" overwrite="true"/>
    	<variable name="FILE_FORMAT" value="test_multifeminos.root" overwrite="true" /> 
        <!-- Globals proper -->
        <parameter name="mainDataPath" value="${IAXOD0_DATAPATH}"/>
        <parameter name="gasDataPath" value="${REST_PATH}/data/gasFiles/"/>
        <parameter name="verboseLevel" value="debug"/>
        %options are : silent, warning, info, debug
        <searchPath value="${REST_INPUTDATA}/definitions/"/>
        <searchPath value="${REST_INPUTDATA}/gasFiles/"/>
    </globals>

    <!-- Run information -->
    <TRestRun name="Background Model" title="Simulations ${EXPERIMENT}. Version ${VERSION}.">
        <parameter name="experiment" value="${EXPERIMENT}"/>
        <parameter name="runType" value="Track_analysis"/>
        <parameter name="readOnly" value="false"/>
        <parameter name="runNumber" value="auto"/>
        <parameter name="runTag" value="test lobis"/>
        <parameter name="runDescription" value="empty"/>
        <parameter name="user" value="${USER}"/>
        <parameter name="verboseLevel" value="3"/>
        <parameter name="overwrite" value="off"/>

        <parameter name="outputFile"
                   value="${FILE_FORMAT}"/>
        <parameter name="inputFile"
                   value="/home/lobis/gitlab/IAXOD0-REST/simulations_data/cosmic_muons/RUN_SIMULATION_Muons_ArIso_n5000_lobis_v2.11_00001_OK.root"/>

        <addMetadata type="TRestReadout" name="iaxo_readout" file="${IAXODO_ANALYSIS_PATH}/readout/readouts.root"/>
        <TRestGas name="Argon-Isobutane 2Pct 10-10E3Vcm" pressure="3" file="${REST_PATH}/data/definitions/gases.rml"/>
    </TRestRun>

    <!-- Process manager -->

    <!--<TRestManager name="restSimAnalysis" title="restSimAnalysis">-->
    <TRestProcessRunner name="TemplateEventProcess" verboseLevel="1">

        <parameter name="pureAnalysisOutput" value="OFF"/>
        <parameter name="processesFile" value="${IAXODO_ANALYSIS_PATH}/processes/G4processes.rml"/>

        <!-- Adding metadata -->
        <addMetadata type="TRestReadout" name="iaxo_readout" value="ON" overwrite="true"/>
        <!-- <addMetadata type="TRestReadout" name="IAXOD0_Readout" value="ON" overwrite="true" > -->
        <!-- We can modify/shift the readout plane definition that was prebuilt in a root file here using a sentence like -->
        <!-- <readoutPlane id="0" planePosition="(0,-42.25,-15.6)" cathodePosition="(0,0,22.5)" />-->

        <addMetadata type="TRestGas" name="${IAXOD0_GAS}" pressure="1.4" value="ON"
                     overwrite="true"/> <!-- gas pressure units in TRestGas is atm -->

        <!-- Adding processes -->

        <!-- Geant4 Analysis -->
        <addProcess type="TRestGeant4AnalysisProcess" name="g4Ana" value="ON"/>

        <!-- Now we need to define in the manager the tasks we will perform.
             If task processEvents is not enabled processes will not be launched -->
        <addTask type="processEvents" value="ON"/>
    </TRestProcessRunner>


</TRestManager>

It is solved now, the problem was that <addTask type="processEvents" value="ON"/> was inside TRestProcessRunner instead of on the outside (I dont know why it was here, maybe on an older version it used to be here?). Maybe it could be convenient to add a warning for this problem if its a common one.

It is true that it makes hard to identify the source of the error. But it is not obvious to me how to that. It means we need a list of keywords we can use in a metadata class? As <addTask, <addProcess, etc. Then, if we use any other keyword, as <addProcess inside <TRestManager we could make a warning saying the keyword is not recognised?

In any case, I believe if we do not find any task in TRestManager we could add a type="processEvents" by default? That is more straightforward. Then, if we find one single task we do whatever the task says, and forget about adding the default task.

1 Like