Index: trunk/data/trigger.dat
===================================================================
--- trunk/data/trigger.dat	(revision 52)
+++ trunk/data/trigger.dat	(revision 52)
@@ -0,0 +1,3 @@
+# list of trigger algorithms
+# trigger_name	algorithm			comments
+SingleElec  >> ELEC1_PT: '20' & ELEC2_PT: '10' & ELEC3_PT: '3' & MUON1_PT '10'                      # requires at least 1 muon with p_t > 3
Index: trunk/interface/TriggerUtil.h
===================================================================
--- trunk/interface/TriggerUtil.h	(revision 52)
+++ trunk/interface/TriggerUtil.h	(revision 52)
@@ -0,0 +1,40 @@
+#ifndef _TRIGUTIL_H_
+#define _TRIGUTIL_H_
+
+/*
+  ---- Delphes ----
+  A Fast Simulator for general purpose LHC detector
+  S. Ovyn ~~~~ severine.ovyn@uclouvain.be
+  
+  Center for Particle Physics and Phenomenology (CP3)
+  Universite Catholique de Louvain (UCL)
+  Louvain-la-Neuve, Belgium
+*/
+
+/// \file SmearUtil.h
+/// \brief RESOLution class, and some generic definitions
+
+
+#include <vector>
+#include "TLorentzVector.h"
+
+#include "Utilities/ExRootAnalysis/interface/BlockClasses.h"
+#include "Utilities/ExRootAnalysis/interface/TSimpleArray.h"
+
+using namespace std;
+
+class Trigger
+{
+ public:
+  /// Constructor
+  Trigger();
+
+  vector<int> GetCuts(const vector<string> &Sequences);
+
+  void getTrigCondition(const std::string& trigger_algorithm);
+
+  void TriggerReader(const string filename="data/trigger.dat");
+
+};
+
+#endif
Index: trunk/src/TriggerUtil.cc
===================================================================
--- trunk/src/TriggerUtil.cc	(revision 52)
+++ trunk/src/TriggerUtil.cc	(revision 52)
@@ -0,0 +1,90 @@
+/*
+ *   ---- Delphes ----
+ *     A Fast Simulator for general purpose LHC detector
+ *       S. Ovyn ~~~~ severine.ovyn@uclouvain.be
+ *
+ *         Center for Particle Physics and Phenomenology (CP3)
+ *           Universite Catholique de Louvain (UCL)
+ *             Louvain-la-Neuve, Belgium
+ *             */
+
+// \brief Trigger class, and some generic definitions
+
+#include "interface/TriggerUtil.h"
+#include "TRandom.h"
+
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <iomanip>
+#include <cstring>
+
+using namespace std;
+
+Trigger::Trigger() {}
+
+vector<int> Trigger::GetCuts(const vector<string> &Sequences)
+{
+  vector<int> OrderedValue;
+  string ptVal;
+  Int_t PtVal=0;
+  for(unsigned int i=0; i < Sequences.size(); i++) {
+    ptVal = Sequences[i].substr( Sequences[i].find("'")+1) ;
+    PtVal = atoi( ptVal.c_str() );
+    OrderedValue.push_back(PtVal);
+   }
+  return OrderedValue;
+
+}
+
+void Trigger::getTrigCondition(const string& trigger_algorithm) {
+  
+  vector<string> ElecSequences;
+  vector<string> MuonSequences;
+  vector<string> JetSequences;
+  vector<string> TauJetSequences;
+  vector<string> EtmisSequences;
+  vector<string> GammaSequences;
+  
+  char *result = NULL;
+  result = strtok( (char*) trigger_algorithm.c_str(),"&");
+  while( result != NULL ) 
+     {
+       if(strstr (result,"ELEC"))ElecSequences.push_back(result);
+       if(strstr (result,"MUON"))MuonSequences.push_back(result);
+       if(strstr (result,"JET"))JetSequences.push_back(result);
+       if(strstr (result,"TAUJET"))TauJetSequences.push_back(result);
+       if(strstr (result,"ETMIS"))EtmisSequences.push_back(result);
+       if(strstr (result,"GAMMA"))GammaSequences.push_back(result);
+       result = strtok( NULL,"&");
+     }    
+  
+  vector<int> ElecValues = GetCuts(ElecSequences);
+  vector<int> MuonValues = GetCuts(MuonSequences);
+  vector<int> JetValues = GetCuts(JetSequences);
+  vector<int> TauJetValues = GetCuts(TauJetSequences);
+  vector<int> EtmisValues = GetCuts(EtmisSequences);
+  vector<int> GammaValues = GetCuts(GammaSequences);
+
+}
+
+void Trigger::TriggerReader(const string filename) {
+   ifstream trigger_file(filename.c_str());
+   if( !trigger_file.good() ) {
+	cout << "ERROR: Trigger input file "<< filename << " not found. Exiting.\n";
+	return;
+   }
+
+   string temp_string, temp_string_no_comment, trigger_name, trigger_algorithm;
+   while ( getline(trigger_file,temp_string) ) {
+	string temp_string_no_comment = temp_string.substr(0,temp_string.find("#")); //remove comments
+	if(temp_string_no_comment.size()<2) continue;  // avoid empty lines
+ 	istringstream temp_stream(temp_string_no_comment);
+
+	temp_stream >> trigger_name;
+	trigger_algorithm = temp_string_no_comment.substr( temp_string_no_comment.find(">>")+2) ;
+
+        getTrigCondition(trigger_algorithm);
+   }
+}
+
