diff --git a/Trigger/TrigValidation/TrigValTools/TrigValTools/TrigValToolsDict.h b/Trigger/TrigValidation/TrigValTools/TrigValTools/TrigValToolsDict.h
index 5ca39ec514308b5f683d81ee4cce18045eb200ea..06fa29bed71710a51692e04978c4b3052ed5e494 100644
--- a/Trigger/TrigValidation/TrigValTools/TrigValTools/TrigValToolsDict.h
+++ b/Trigger/TrigValidation/TrigValTools/TrigValTools/TrigValToolsDict.h
@@ -6,3 +6,5 @@
 #include "TFileLooper.h"
 #include "TMultiFileLooper.h"
 #include "TRoot2Html.h"
+
+#include "TPRegexp.h"
diff --git a/Trigger/TrigValidation/TrigValTools/bin/chainDump.py b/Trigger/TrigValidation/TrigValTools/bin/chainDump.py
index 5a566f01817efead4eb4fb0b64311418aaee5c34..548d16c9d574c3400c62a7df8fd13af7ec5a9a42 100755
--- a/Trigger/TrigValidation/TrigValTools/bin/chainDump.py
+++ b/Trigger/TrigValidation/TrigValTools/bin/chainDump.py
@@ -3,7 +3,7 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 #################################################################
 # script to dump selected results to a text file
-#
+# Upated by czodrows, 12-12-14 - adding the L1 items implemented by Joerg
 #
 #################################################################
 
@@ -20,22 +20,22 @@ import datetime;
 # set defaults here so they are same for RTT and command line
 rfile = "expert-monitoring.root"
 # directories and histograms for chain acceptance and TEs
-dirs  = ["TrigSteer_L2","TrigSteer_EF", "TrigSteer_HLT"]  
-hists = ["ChainAcceptance_runsummary","NumberOfActiveTEs_runsummary"]
+dirs  = ["TrigSteer_HLT","CTPSimulation"]  
+hists = ["ChainAcceptance","NumberOfActiveTEs","L1ItemsAV"]
 #backup names
-backupName = { "ChainAcceptance_runsummary":"ChainAcceptance",
-              "NumberOfActiveTEs_runsummary":"NumberOfActiveTEs" }
+#backupName = { "ChainAcceptance":"ChainAcceptance_runsummary",
+#               "NumberOfActiveTEs":"NumberOfActiveTEs_runsummary"}
 
 # directories and histogram to be used for finding number of events that
 # were run on
 totDirs = dirs
 totHist ="NInitialRoIsPerEvent"
 # short names for files
-histDict = { "TrigSteer_L2":"L2",
-             "TrigSteer_EF":"EF",
-             "TrigSteer_HLT":"HLT",
-             "ChainAcceptance_runsummary":"Chain",
-             "NumberOfActiveTEs_runsummary":"TE"   }
+histDict = { "TrigSteer_HLT":"HLT",
+             "ChainAcceptance":"Chain",
+             "NumberOfActiveTEs":"TE",
+             "CTPSimulation":"L1",
+             "L1ItemsAV":"AV" }
 defFracTolerance  = "0.001"
 defSigmaTolerance = "0.0"
 defIntTolerance   = "2"
@@ -114,6 +114,9 @@ class chainDump:
         for j in range(nbins):
             # first bin is for underflows
             char_label = hst.GetXaxis().GetBinLabel(j+1)
+            #PC - skip the ones without any label
+            if char_label=="" :
+                continue
             chainCounts =  hst.GetBinContent(j+1)
             pairedList +=[[char_label,chainCounts]]
             if self.verbose:
@@ -350,12 +353,15 @@ class chainDump:
                             #print "grandTotalEvents", self.grandTotalEvents
                         else:
                             if hist_entries != total_events:
-                                print "WARNING: total events in different directories don't match"      
+                                print "WARNING: total events in different directories don't match" 
+                        if total_events != -1:
+                            print "Found %s events" % total_events
+                            break
                     tfile.cd("..")
                 except:
                   print "ERROR: cound not cd to directory: ", dir
             else:
-                print "WARNING: direcory ", dir," not found, could be normal if only HLT, EF or L2 is run"
+                print "WARNING: direcory ", dir," not found, could be normal if only HLT is run"
     
         found = False
         fileList=[]
@@ -369,12 +375,13 @@ class chainDump:
                 try:
                     tfile.cd(dir)
                     for histName in self.checkHist:
-                        print "dir,histName",dir,histName
+                        #print "trying dir,histName",dir,histName
+                        hist = 0
                         if histName in gDirectory.GetListOfKeys():
                             hist = gDirectory.Get(histName)
-                        else:
-                            print "trying backup",backupName[histName]
-                            hist = gDirectory.Get(backupName[histName])
+                            # else:
+                            #   print "trying backup",backupName[histName]
+                            #   hist = gDirectory.Get(backupName[histName])
                         if  hist != 0:
                             if  dir in histDict  and  histName in histDict:
                                 textFileName=histDict[dir]+histDict[histName]+".txt"
@@ -385,12 +392,15 @@ class chainDump:
                             fileList +=[chainList]
                             found = True
                         else:
-                           print "WARNING:  missing L2 or EF resutls (normal if only HLT, L2 or EF is run)"
+                            #not really useful to print a warning for not working dir/hist combinations  
+                            #print "WARNING:  missing L2 or EF resutls (normal if only HLT is run)"
+                            #print "nope combination ain't working - but fine"
+                            continue
                     tfile.cd("..")
                 except:
-                  print "ERROR: cound not cd to directory: ", dir
+                  print "ERROR2: cound not cd to directory: ", dir
             else:
-                print "WARNING: direcory ", dir," not found, could be normal if only EF or L2 is run"
+                print "WARNING: direcory ", dir," not found"
  
         self.results += [ [fileList,file,total_events] ]
         #print "DMS len:",len(self.results)
@@ -540,8 +550,9 @@ class chainDump:
                    except:
                        print "WARNING:  exception could not interpret direcotry structure"
                        releases +=[file]
-               else: 
-                   print "WARNING: no directory and/or release sturucture found"
+               else:
+                   #this is not appropiate here
+                   #print "WARNING: no directory and/or release sturucture found"
                    releases +=[file]
 
        if self.verbose: 
diff --git a/Trigger/TrigValidation/TrigValTools/cmt/requirements b/Trigger/TrigValidation/TrigValTools/cmt/requirements
index 4fdb878296544dd8a741d5f83d8277051b2f8436..de873da0705fe12241d149acae58703e65fcef9e 100644
--- a/Trigger/TrigValidation/TrigValTools/cmt/requirements
+++ b/Trigger/TrigValidation/TrigValTools/cmt/requirements
@@ -9,6 +9,12 @@ use AtlasROOT      AtlasROOT-*          External
 
 apply_tag ROOTGraphicsLibs
 
+# Specify the required ROOT components for cmake (transparent to CMT)
+apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS Hist Graf Gpad RIO)"
+
+# Declare for cmake that this package has private header files (transparent to CMT)
+apply_pattern cmake_add_command command="include_directories(src)"
+
 apply_pattern declare_scripts files="../bin/*.py \
 	      		             ../bin/*.pl \
 				     ../bin/*.sh"
diff --git a/Trigger/TrigValidation/TrigValTools/macros/TrigTest_CheckCounts.C b/Trigger/TrigValidation/TrigValTools/macros/TrigTest_CheckCounts.C
index b267b38cb2641d49db6deade1a7e054bc6636e80..31c6ec12abbab00a80c9c64a7247653d6f187ba9 100644
--- a/Trigger/TrigValidation/TrigValTools/macros/TrigTest_CheckCounts.C
+++ b/Trigger/TrigValidation/TrigValTools/macros/TrigTest_CheckCounts.C
@@ -7,14 +7,26 @@
  
  Original version from N. Sinev
  
- Upated by Strom,      05-10-09
- Upated by Czodrowski, 08-05-14 - to ensure merged HLT compatibility
+ Upated by Strom,       05-10-09
+ Upated by czodrows     08-05-14 - to ensure merged HLT compatibility
+ Upated by czodrows     12-12-14 - add the L1 Chains added by Joerg
+ 
  
  Compare both total chain acceptance and results
  of individual TEs
  
+ #to test "offline" do:
+ tol=10
+ 
+ ref=/path/to/a/refence/expert/monitoring/file.root
+ #in my local case
+ ref=r.root
+ level="HLT"
+ echo -e ".x TrigTest_CheckCounts.C($tol,\042${ref}\042,\042${level}\042) \n .q " | root -b 
  */
 
+
+
 #include <TTree.h>
 #include <TFile.h>
 #include <TMath.h>
@@ -52,6 +64,13 @@ void  TrigTest_CheckCounts(Int_t toler,char *refname, char *level)
         exit(-1);
     }
     
+    TDirectory *l1_dir_cur =  rf->GetDirectory("../CTPSimulation");///L1ItemsAV");
+    TDirectory *l1_dir_ref = ref->GetDirectory("../CTPSimulation");///L1ItemsAV");
+    bool run_l1=0;
+    if((l1_dir_cur)&&(l1_dir_ref)) run_l1=1;
+    
+    
+    
     ///this is option for possible direct calls of levels
     if(TString(level)=="L2"||TString(level)=="EF"||TString(level)=="HLT"){
         hnames[0] =new TString("ChainAcceptance");
@@ -66,6 +85,13 @@ void  TrigTest_CheckCounts(Int_t toler,char *refname, char *level)
         //hanames[1]=new TString("NumberOfActiveTEs_runsummary");
         fnames[1] =new TString("TrigSteer_"+TString(level));
         ncheck =2;
+        
+        if(run_l1) {
+            hnames[2] =new TString("L1ItemsAV");
+            hanames[2]=new TString("L1ItemsAV");
+            fnames[2] =new TString("CTPSimulation");
+            ncheck =3;
+        }
         cout << "Checking " << level << " trigger counts" << endl;
     }
     
@@ -85,6 +111,12 @@ void  TrigTest_CheckCounts(Int_t toler,char *refname, char *level)
             hanames[1]=new TString("NumberOfActiveTEsPerEvent");
             fnames[1] =new TString("TrigSteer_HLT");
             ncheck =2;
+            if(run_l1) {
+                hnames[2] =new TString("L1ItemsAV");
+                hanames[2]=new TString("L1ItemsAV");
+                fnames[2] =new TString("CTPSimulation");
+                ncheck =3;
+            }
             cout << "Checking HLT trigger counts" << endl;
         } else {
             //cout << "TrigLevel BOTH was given -- please ignore the following info line if this is a release < 18 "<< endl; 
@@ -113,6 +145,12 @@ void  TrigTest_CheckCounts(Int_t toler,char *refname, char *level)
             //hanames[3]=new TString("NumberOfActiveTEs_runsummary");
             fnames[3] =new TString("TrigSteer_EF");
             ncheck =4;
+            if(run_l1) {
+                hnames[4] =new TString("L1ItemsAV");
+                hanames[4]=new TString("L1ItemsAV");
+                fnames[4] =new TString("CTPSimulation");
+                ncheck =5;
+            }
             cout << "Checking L2 and EF trigger counts " << endl;
         }
     } //end if(TString(level)=="BOTH")
@@ -124,46 +162,52 @@ void  TrigTest_CheckCounts(Int_t toler,char *refname, char *level)
     
     Bool_t DIRERROR=0;
     //check if any TrigSteer directory exists - and also if they are the correct one(s) 
-        TDirectory *hlt_dir_ref = ref->GetDirectory("TrigSteer_HLT");
-        TDirectory *hlt_dir_cur =  rf->GetDirectory("TrigSteer_HLT");
-        
-        TDirectory *ef_dir_ref = ref->GetDirectory("TrigSteer_EF");
-        TDirectory *ef_dir_cur =  rf->GetDirectory("TrigSteer_EF");
-        TDirectory *l2_dir_ref = ref->GetDirectory("TrigSteer_L2");
-        TDirectory *l2_dir_cur =  rf->GetDirectory("TrigSteer_L2");
-        
-        if(TString(level)=="L2"){ 
+    TDirectory *hlt_dir_ref = ref->GetDirectory("TrigSteer_HLT");
+    TDirectory *hlt_dir_cur =  rf->GetDirectory("TrigSteer_HLT");
+    
+    TDirectory *ef_dir_ref = ref->GetDirectory("TrigSteer_EF");
+    TDirectory *ef_dir_cur =  rf->GetDirectory("TrigSteer_EF");
+    TDirectory *l2_dir_ref = ref->GetDirectory("TrigSteer_L2");
+    TDirectory *l2_dir_cur =  rf->GetDirectory("TrigSteer_L2");
+    //        TDirectory *l1_dir_cur =  rf->GetDirectory("../CTPSimulation");///L1ItemsAV");
+    //        TDirectory *l1_dir_ref = ref->GetDirectory("../CTPSimulation");///L1ItemsAV");
+    
+    if(TString(level)=="L2"){ 
+        if(!(l2_dir_ref)) cout << "Bad reference file: " << *reffile << " : Does not contain the directory: TrigSteer_L2 " << endl; 
+        if(!(l2_dir_cur)) cout << "Bad expert-monitoring.root file: Does not contain the directory: TrigSteer_L2 " << endl;
+        if(!(l2_dir_ref)||!(l2_dir_cur))  DIRERROR=1;
+    }
+    if(TString(level)=="EF"){     
+        if(!(ef_dir_ref)) cout << "Bad reference file: " << *reffile << " : Does not contain the directory: TrigSteer_EF " << endl;
+        if(!(ef_dir_cur)) cout << "Bad expert-monitoring.root file: Does not contain the directory: TrigSteer_EF " << endl;
+        if(!(ef_dir_ref)||!(ef_dir_cur)) DIRERROR=1;
+    }
+    if(TString(level)=="HLT"){
+        //            if(!(l1_dir_cur)) cout << "Bad reference file: " << *reffile << " : Does not contain the directory: CTPSimulation " << endl; 
+        //            if((l1_dir_cur)) cout << "good reference file: " << *reffile << " : Does  contain the directory: CTPSimulation " << endl; 
+        if(!(hlt_dir_ref)) cout << "Bad reference file: " << *reffile << " : Does not contain the directory: TrigSteer_HLT " << endl;
+        if(!(hlt_dir_cur)) cout << "Bad expert-monitoring.root file: Does not contain the directory: TrigSteer_HLT " << endl;
+        if(!(hlt_dir_ref)||!(hlt_dir_cur)) DIRERROR=1;
+    }
+    if(TString(level)=="BOTH"){
+        //            if(!(l1_dir_cur)) cout << "Bad reference file: " << *reffile << " : Does not contain the directory: CTPSimulation " << endl; 
+        //            if((l1_dir_cur)) cout << "good reference file: " << *reffile << " : Does  contain the directory: CTPSimulation " << endl; 
+        //check for existence of TrigSteer_HLT in either of the 2 files
+        if(!(hlt_dir_ref)||!(hlt_dir_cur)){ //not found -> check for L2 and EF TrigSteer_ directories
             if(!(l2_dir_ref)) cout << "Bad reference file: " << *reffile << " : Does not contain the directory: TrigSteer_L2 " << endl; 
             if(!(l2_dir_cur)) cout << "Bad expert-monitoring.root file: Does not contain the directory: TrigSteer_L2 " << endl;
             if(!(l2_dir_ref)||!(l2_dir_cur))  DIRERROR=1;
-        }
-        if(TString(level)=="EF"){     
             if(!(ef_dir_ref)) cout << "Bad reference file: " << *reffile << " : Does not contain the directory: TrigSteer_EF " << endl;
             if(!(ef_dir_cur)) cout << "Bad expert-monitoring.root file: Does not contain the directory: TrigSteer_EF " << endl;
             if(!(ef_dir_ref)||!(ef_dir_cur)) DIRERROR=1;
         }
-        if(TString(level)=="HLT"){
+        //check for existence of L2 and EF TrigSteer_ directories in either of the 2 files
+        if(!(ef_dir_ref)||!(ef_dir_cur)||!(l2_dir_ref)||!(l2_dir_cur)){ //not found -> check for TrigSteer_HLT dirs
             if(!(hlt_dir_ref)) cout << "Bad reference file: " << *reffile << " : Does not contain the directory: TrigSteer_HLT " << endl;
             if(!(hlt_dir_cur)) cout << "Bad expert-monitoring.root file: Does not contain the directory: TrigSteer_HLT " << endl;
             if(!(hlt_dir_ref)||!(hlt_dir_cur)) DIRERROR=1;
         }
-        if(TString(level)=="BOTH"){
-            //check for existence of TrigSteer_HLT in either of the 2 files
-            if(!(hlt_dir_ref)||!(hlt_dir_cur)){ //not found -> check for L2 and EF TrigSteer_ directories
-                if(!(l2_dir_ref)) cout << "Bad reference file: " << *reffile << " : Does not contain the directory: TrigSteer_L2 " << endl; 
-                if(!(l2_dir_cur)) cout << "Bad expert-monitoring.root file: Does not contain the directory: TrigSteer_L2 " << endl;
-                if(!(l2_dir_ref)||!(l2_dir_cur))  DIRERROR=1;
-                if(!(ef_dir_ref)) cout << "Bad reference file: " << *reffile << " : Does not contain the directory: TrigSteer_EF " << endl;
-                if(!(ef_dir_cur)) cout << "Bad expert-monitoring.root file: Does not contain the directory: TrigSteer_EF " << endl;
-                if(!(ef_dir_ref)||!(ef_dir_cur)) DIRERROR=1;
-            }
-            //check for existence of L2 and EF TrigSteer_ directories in either of the 2 files
-            if(!(ef_dir_ref)||!(ef_dir_cur)||!(l2_dir_ref)||!(l2_dir_cur)){ //not found -> check for TrigSteer_HLT dirs
-                if(!(hlt_dir_ref)) cout << "Bad reference file: " << *reffile << " : Does not contain the directory: TrigSteer_HLT " << endl;
-                if(!(hlt_dir_cur)) cout << "Bad expert-monitoring.root file: Does not contain the directory: TrigSteer_HLT " << endl;
-                if(!(hlt_dir_ref)||!(hlt_dir_cur)) DIRERROR=1;
-            }
-        }
+    }
     
     if(DIRERROR){
         cout << "checkcounts: ERROR : Inconsitency/Problem with the TrigSteer_ directories in the reference and/or expert-monitoring.root file detected - exiting CheckCounts!" << endl;
@@ -234,28 +278,36 @@ void  TrigTest_CheckCounts(Int_t toler,char *refname, char *level)
         }
         for(Int_t i=0; i<nbins+EXT_BNS; i++)
         {    
+            
             newbc[i]=0.;
             oldbc[i]=0.;
         }
+        
         for(Int_t i=0; i<nbins; i++) newbc[i]=tchain->GetBinContent(i);
         TH1 *echist;
-        gDirectory->GetObject("NInitialRoIsPerEvent",echist); 
+        gDirectory->GetObject("NInitialRoIsPerEvent",echist);  
+        if (*fname=="CTPSimulation"){
+            const char * olddir ;
+            olddir = gDirectory->GetPath() ;
+            gDirectory->GetObject("../"+(*fnames[0])+"/NInitialRoIsPerEvent",echist);   
+            gDirectory->cd(olddir);
+        }
         // look for old sytle names if new one is not there
-        if(echist == 0 ){
-            `    if(fname->Contains("_EF"))
-                `   {
-                    gDirectory->GetObject("N_Initial_RoI_in_Event_EF",echist);   
-                }            
-            if(fname->Contains("_L2"))
-            {
-                gDirectory->GetObject("N_Initial_RoI_in_Event_L2",echist);   
-            }
-            if(echist==0)
-            {    
-                cout << "checkcounts FAILURE : can't determine number of events processed" << endl;      
-                continue;
-            }
-        } 
+        //        if(echist == 0 ){
+        //            `    if(fname->Contains("_EF"))
+        //                `   {
+        //                    gDirectory->GetObject("N_Initial_RoI_in_Event_EF",echist);   
+        //                }            
+        //            if(fname->Contains("_L2"))
+        //            {
+        //                gDirectory->GetObject("N_Initial_RoI_in_Event_L2",echist);   
+        //            }
+        if(echist==0)
+        {    
+            cout << "checkcounts FAILURE : can't determine number of events processed" << endl;      
+            continue;
+        }
+        //        } 
         nrnnew=echist->GetEntries();
         cout << "Number of events processed in test: " << nrnnew << endl;               
         rf->Close();
@@ -296,7 +348,7 @@ void  TrigTest_CheckCounts(Int_t toler,char *refname, char *level)
         {
             Int_t bi = -1;
             TString *obna = new TString(otchain->GetXaxis()->GetBinLabel(i));
-            if( debug ){ cout << "reference bin label: " << *obna << endl; }
+            if( debug ){ cout << i << "reference bin label: " << *obna << endl; }
             for(Int_t si=0; si<nbins+nexlb; si++)
             {
                 if(xlabels[si]->CompareTo(*obna) == 0) bi=si;   
@@ -321,21 +373,28 @@ void  TrigTest_CheckCounts(Int_t toler,char *refname, char *level)
         }
         TH1 *echist;
         gDirectory->GetObject("NInitialRoIsPerEvent",echist); 
+        if (*fname=="CTPSimulation"){
+            const char * olddir ;
+            olddir = gDirectory->GetPath() ;
+            gDirectory->GetObject("../"+(*fnames[0])+"/NInitialRoIsPerEvent",echist);    
+            gDirectory->cd(olddir);
+        }
+        
         // look for old sytle names if new one is not there
-        if(echist == 0 ){
-            if(fname->Contains("_EF"))
-            {
-                gDirectory->GetObject("N_Initial_RoI_in_Event_EF",echist);   
-            }            
-            if(fname->Contains("_L2"))
-            {
-                gDirectory->GetObject("N_Initial_RoI_in_Event_L2",echist);   
-            }
-            if(echist==0){
-                cout << "failed to find number of events in reference" << endl;
-                continue;
-            }
+        //        if(echist == 0 ){
+        //            if(fname->Contains("_EF"))
+        //            {
+        //                gDirectory->GetObject("N_Initial_RoI_in_Event_EF",echist);   
+        //            }            
+        //            if(fname->Contains("_L2"))
+        //            {
+        //                gDirectory->GetObject("N_Initial_RoI_in_Event_L2",echist);   
+        //            }
+        if(echist==0){
+            cout << "failed to find number of events in reference" << endl;
+            continue;
         }
+        //        }
         nrnold=echist->GetEntries();
         cout << "Number of events in reference: " << nrnold << endl;               
         orf->Close();
diff --git a/Trigger/TrigValidation/TrigValTools/src/TRoot2Html.cxx b/Trigger/TrigValidation/TrigValTools/src/TRoot2Html.cxx
index 7d019a401f95260c2eef94e71ffc9f5fbd496c84..80445812fa9fa30edf198d64055532b36a8473f7 100644
--- a/Trigger/TrigValidation/TrigValTools/src/TRoot2Html.cxx
+++ b/Trigger/TrigValidation/TrigValTools/src/TRoot2Html.cxx
@@ -26,6 +26,7 @@
 using namespace std;
 
 TRoot2Html::TRoot2Html() :
+  _nodeId(1),
   _showFullFileName(kFALSE)
 {
   setOutputDir("./");
@@ -33,7 +34,11 @@ TRoot2Html::TRoot2Html() :
 }
 
 TRoot2Html::TRoot2Html(const TRoot2Html& other):
-  TMultiFileLooper(other)
+  TMultiFileLooper(other),
+  _imgHeight(other._imgHeight),
+  _imgWidth(other._imgWidth),
+  _nodeId(other._nodeId),
+  _showFullFileName(other._showFullFileName)
 {
 }